* Added an explicit type field to ComplexPattern.
* Renamed MatchingNodes to RootNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24636 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index cf5abc2..3379f46 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -478,8 +478,7 @@
     // Using a VTSDNode or CondCodeSDNode.
     return MVT::Other;
   } else if (R->isSubClassOf("ComplexPattern")) {
-    const CodeGenTarget &T = TP.getDAGISelEmitter().getTargetInfo();
-    return T.getPointerType();
+    return TP.getDAGISelEmitter().getComplexPattern(R).getValueType();
   } else if (R->getName() == "node") {
     // Placeholder.
     return MVT::isUnknown;
@@ -2256,7 +2255,7 @@
              dynamic_cast<IntInit*>(Node->getLeafValue())) {
         PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]);
       } else if ((CP = NodeGetComplexPattern(Node, *this))) {
-        std::vector<Record*> OpNodes = CP->getMatchingNodes();
+        std::vector<Record*> OpNodes = CP->getRootNodes();
         for (unsigned j = 0, e = OpNodes.size(); j != e; j++) {
           PatternsByOpcode[OpNodes[j]].insert(PatternsByOpcode[OpNodes[j]].begin(),
                                               &PatternsToMatch[i]);