From fa0d74d58e6c70ef032afb5f83680276dc4d7370 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 6 Sep 2010 21:28:52 +0000 Subject: [PATCH] simplify DEBUG_WITH_TYPE usage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113174 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/AsmMatcherEmitter.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index b9953711cf7..a2222df2233 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -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. -- 2.34.1