simplify DEBUG_WITH_TYPE usage
[oota-llvm.git] / utils / TableGen / AsmMatcherEmitter.cpp
index b9953711cf71f4c2d750ebec0307c39a22c4b449..a2222df223384fa76295feed4ef293a5f94b4203 100644 (file)
@@ -1525,30 +1525,27 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
     });
 
   // Check for ambiguous instructions.
-  DEBUG(unsigned NumAmbiguous = 0;
+  DEBUG_WITH_TYPE("ambiguous_instrs", {
+    unsigned NumAmbiguous = 0;
     for (unsigned i = 0, e = Info.Instructions.size(); i != e; ++i) {
       for (unsigned j = i + 1; j != e; ++j) {
         InstructionInfo &A = *Info.Instructions[i];
         InstructionInfo &B = *Info.Instructions[j];
       
         if (A.CouldMatchAmiguouslyWith(B)) {
-          DEBUG_WITH_TYPE("ambiguous_instrs", {
-              errs() << "warning: ambiguous instruction match:\n";
-              A.dump();
-              errs() << "\nis incomparable with:\n";
-              B.dump();
-              errs() << "\n\n";
-            });
+          errs() << "warning: ambiguous instruction match:\n";
+          A.dump();
+          errs() << "\nis incomparable with:\n";
+          B.dump();
+          errs() << "\n\n";
           ++NumAmbiguous;
         }
       }
     }
     if (NumAmbiguous)
-      DEBUG_WITH_TYPE("ambiguous_instrs", {
-          errs() << "warning: " << NumAmbiguous 
-                 << " ambiguous instructions!\n";
-        });
-  );
+      errs() << "warning: " << NumAmbiguous 
+             << " ambiguous instructions!\n";
+  });
 
   // Write the output.