aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-27 20:43:37 +0000
committerChris Lattner <sabre@nondot.org>2007-02-27 20:43:37 +0000
commit798dc7adb4f473c196c0000728fbaab0eb4fd8f2 (patch)
treec6dbcbe45ae8ffad95c3080010da90ab8fd6b65c /utils/TableGen/CodeGenTarget.cpp
parent914c3bca870e448731b210b528a6a2f450ece772 (diff)
initial support for calling convention generation, still unfinished.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 688ed0f924..d29ce514be 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/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<DefInit*>(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<DefInit*>(PropList->getElement(i));
- assert(DI && "Invalid list type!");
- Record *Property = DI->getDef();
+ Record *Property = PropList->getElementAsRecord(i);
assert(Property->isSubClassOf("IntrinsicProperty") &&
"Expected a property!");