diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-02-27 21:44:08 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-27 21:44:08 +0000 |
commit | 53c9b3f68c74c6ea4d739bb268e5fc5b495adff3 (patch) | |
tree | 6d62458335e7058f8ce46221d440c00249f6cca0 /utils/TableGen/CodeGenTarget.cpp | |
parent | 5ef9226f30d0615558cdfc6a2b76c7a914a8e32f (diff) |
Backing out
CodeGenTarget.cpp updated: 1.82 -> 1.83
Record.cpp updated: 1.55 -> 1.56
Record.h updated: 1.59 -> 1.60
TableGen.cpp updated: 1.47 -> 1.48
It's missing CallingConvEmitter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index d29ce514be..688ed0f924 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -604,7 +604,9 @@ 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) { - Record *TyEl = TypeList->getElementAsRecord(i); + DefInit *DI = dynamic_cast<DefInit*>(TypeList->getElement(i)); + assert(DI && "Invalid list type!"); + Record *TyEl = DI->getDef(); assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!"); ArgTypes.push_back(TyEl->getValueAsString("TypeVal")); @@ -618,7 +620,9 @@ 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) { - Record *Property = PropList->getElementAsRecord(i); + DefInit *DI = dynamic_cast<DefInit*>(PropList->getElement(i)); + assert(DI && "Invalid list type!"); + Record *Property = DI->getDef(); assert(Property->isSubClassOf("IntrinsicProperty") && "Expected a property!"); |