enhance the new isel to use SelectNodeTo for most patterns,
[oota-llvm.git] / utils / TableGen / DAGISelMatcher.cpp
index d939edb563e83d4ab3fa2b80900f917cfd2fe07a..085682fd1bc5cdad94749a916d91b0e222e10fae 100644 (file)
@@ -39,8 +39,12 @@ ScopeMatcher::~ScopeMatcher() {
 
 void ScopeMatcher::printImpl(raw_ostream &OS, unsigned indent) const {
   OS.indent(indent) << "Scope\n";
-  for (unsigned i = 0, e = getNumChildren(); i != e; ++i)
-    getChild(i)->print(OS, indent+2);
+  for (unsigned i = 0, e = getNumChildren(); i != e; ++i) {
+    if (getChild(i) == 0)
+      OS.indent(indent+1) << "NULL POINTER\n";
+    else
+      getChild(i)->print(OS, indent+2);
+  }
 }
 
 void RecordMatcher::printImpl(raw_ostream &OS, unsigned indent) const {