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
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index d29ce51..688ed0f 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -604,7 +604,9 @@
   // 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 @@
   // 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!");