summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-27 21:44:08 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-27 21:44:08 +0000
commit116ec30e4f77a144c6e0f4f2245f825cd2ad039e (patch)
tree06e59af7721d13184ed3c38d65f5766638d8c9e7 /llvm/utils/TableGen/CodeGenTarget.cpp
parent71a7271b8b558d1f8475bfb0eadd93b2d43ef540 (diff)
downloadbcm5719-llvm-116ec30e4f77a144c6e0f4f2245f825cd2ad039e.tar.gz
bcm5719-llvm-116ec30e4f77a144c6e0f4f2245f825cd2ad039e.zip
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 llvm-svn: 34693
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index d29ce514bed..688ed0f9248 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/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!");
OpenPOWER on IntegriCloud