From 63554988a94b8a4bcf3de77659a0b27c07a0975d Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Fri, 5 Oct 2012 03:32:00 +0000 Subject: tblgen: Use appropriate LLVM-style RTTI functions. Use isa<> or cast<> when semantically that is what is happening. Also some trivial "style" cleanups at fix sites. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165292 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/TableGen/Record.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/llvm/TableGen') diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index 0e75cf4..079dc8c 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -1085,9 +1085,9 @@ class VarBitInit : public Init { VarBitInit(TypedInit *T, unsigned B) : TI(T), Bit(B) { assert(T->getType() && - (dyn_cast(T->getType()) || - (dyn_cast(T->getType()) && - dyn_cast(T->getType())->getNumBits() > B)) && + (isa(T->getType()) || + (isa(T->getType()) && + cast(T->getType())->getNumBits() > B)) && "Illegal VarBitInit expression!"); } @@ -1120,9 +1120,9 @@ class VarListElementInit : public TypedInit { unsigned Element; VarListElementInit(TypedInit *T, unsigned E) - : TypedInit(dyn_cast(T->getType())->getElementType()), + : TypedInit(cast(T->getType())->getElementType()), TI(T), Element(E) { - assert(T->getType() && dyn_cast(T->getType()) && + assert(T->getType() && isa(T->getType()) && "Illegal VarBitInit expression!"); } -- cgit v1.1