From cbebe4600fff15f5ce56780ee12ff5bbb415d4fe Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 27 Feb 2007 22:08:27 +0000 Subject: reapply llvm-svn: 34697 --- llvm/utils/TableGen/CodeGenTarget.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp') diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 688ed0f9248b..d29ce514bedb 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -604,9 +604,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, CodeGenTarget *CGT) { // Parse the list of argument types. ListInit *TypeList = R->getValueAsListInit("Types"); for (unsigned i = 0, e = TypeList->getSize(); i != e; ++i) { - DefInit *DI = dynamic_cast(TypeList->getElement(i)); - assert(DI && "Invalid list type!"); - Record *TyEl = DI->getDef(); + Record *TyEl = TypeList->getElementAsRecord(i); assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!"); ArgTypes.push_back(TyEl->getValueAsString("TypeVal")); @@ -620,9 +618,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, CodeGenTarget *CGT) { // Parse the intrinsic properties. ListInit *PropList = R->getValueAsListInit("Properties"); for (unsigned i = 0, e = PropList->getSize(); i != e; ++i) { - DefInit *DI = dynamic_cast(PropList->getElement(i)); - assert(DI && "Invalid list type!"); - Record *Property = DI->getDef(); + Record *Property = PropList->getElementAsRecord(i); assert(Property->isSubClassOf("IntrinsicProperty") && "Expected a property!"); -- cgit v1.2.3