[llvm] r333091 - Remove DEBUG macro.
Nicola Zaghen via llvm-commits
llvm-commits at lists.llvm.org
Wed May 23 08:09:29 PDT 2018
Author: nzaghen
Date: Wed May 23 08:09:29 2018
New Revision: 333091
URL: http://llvm.org/viewvc/llvm-project?rev=333091&view=rev
Log:
Remove DEBUG macro.
Now that the LLVM_DEBUG() macro landed on the various sub-projects
the DEBUG macro can be removed.
Also change the new uses of DEBUG to LLVM_DEBUG.
Differential Revision: https://reviews.llvm.org/D46952
Modified:
llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
llvm/trunk/include/llvm/Support/Debug.h
llvm/trunk/lib/Target/X86/X86DomainReassignment.cpp
llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
llvm/trunk/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASupport.h?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASupport.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASupport.h Wed May 23 08:09:29 2018
@@ -22,14 +22,6 @@
#define NOMINMAX
#endif
-// llvm/Support/Debug.h unconditionally #defines DEBUG as a macro.
-// DIA headers #define it if it is not already defined, so we have
-// an order of includes problem. The real fix is to make LLVM use
-// something less generic than DEBUG, such as LLVM_DEBUG(), but it's
-// fairly prevalent. So for now, we save the definition state and
-// restore it.
-#pragma push_macro("DEBUG")
-
// atlbase.h has to come before windows.h
#include <atlbase.h>
#include <windows.h>
@@ -39,6 +31,4 @@
#include <dia2.h>
#include <diacreate.h>
-#pragma pop_macro("DEBUG")
-
#endif // LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H
Modified: llvm/trunk/include/llvm/Support/Debug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Debug.h?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Debug.h (original)
+++ llvm/trunk/include/llvm/Support/Debug.h Wed May 23 08:09:29 2018
@@ -118,8 +118,6 @@ raw_ostream &dbgs();
//
#define LLVM_DEBUG(X) DEBUG_WITH_TYPE(DEBUG_TYPE, X)
-#define DEBUG(X) LLVM_DEBUG(X)
-
} // end namespace llvm
#endif // LLVM_SUPPORT_DEBUG_H
Modified: llvm/trunk/lib/Target/X86/X86DomainReassignment.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86DomainReassignment.cpp?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86DomainReassignment.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86DomainReassignment.cpp Wed May 23 08:09:29 2018
@@ -753,7 +753,7 @@ bool X86DomainReassignment::runOnMachine
}
for (Closure &C : Closures) {
- DEBUG(C.dump(MRI));
+ LLVM_DEBUG(C.dump(MRI));
if (isReassignmentProfitable(C, MaskDomain)) {
reassign(C, MaskDomain);
++NumClosuresConverted;
Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Wed May 23 08:09:29 2018
@@ -645,8 +645,8 @@ void MergeFunctions::filterInstsUnrelate
static bool isThunkProfitable(Function * F) {
if (F->size() == 1) {
if (F->front().size() <= 2) {
- DEBUG(dbgs() << "isThunkProfitable: " << F->getName()
- << " is too small to bother creating a thunk for\n");
+ LLVM_DEBUG(dbgs() << "isThunkProfitable: " << F->getName()
+ << " is too small to bother creating a thunk for\n");
return false;
}
}
Modified: llvm/trunk/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp Wed May 23 08:09:29 2018
@@ -116,7 +116,7 @@ VPBasicBlock *PlainCFGBuilder::getOrCrea
return BlockIt->second;
// Create new VPBB.
- DEBUG(dbgs() << "Creating VPBasicBlock for " << BB->getName() << "\n");
+ LLVM_DEBUG(dbgs() << "Creating VPBasicBlock for " << BB->getName() << "\n");
VPBasicBlock *VPBB = new VPBasicBlock(BB->getName());
BB2VPBB[BB] = VPBB;
VPBB->setParent(TopRegion);
@@ -314,7 +314,7 @@ void VPlanHCFGBuilder::buildHierarchical
PlainCFGBuilder PCFGBuilder(TheLoop, LI, Plan);
VPRegionBlock *TopRegion = PCFGBuilder.buildPlainCFG();
Plan.setEntry(TopRegion);
- DEBUG(Plan.setName("HCFGBuilder: Plain CFG\n"); dbgs() << Plan);
+ LLVM_DEBUG(Plan.setName("HCFGBuilder: Plain CFG\n"); dbgs() << Plan);
Verifier.verifyHierarchicalCFG(TopRegion);
}
Modified: llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/VPlanVerifier.cpp Wed May 23 08:09:29 2018
@@ -120,7 +120,7 @@ void VPlanVerifier::verifyHierarchicalCF
if (!EnableHCFGVerifier)
return;
- DEBUG(dbgs() << "Verifying VPlan H-CFG.\n");
+ LLVM_DEBUG(dbgs() << "Verifying VPlan H-CFG.\n");
assert(!TopRegion->getParent() && "VPlan Top Region should have no parent.");
verifyRegionRec(TopRegion);
}
Modified: llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp?rev=333091&r1=333090&r2=333091&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp Wed May 23 08:09:29 2018
@@ -4063,7 +4063,7 @@ std::vector<Matcher *> GlobalISelEmitter
}
ProcessCurrentGroup();
- DEBUG(dbgs() << "NumGroups: " << NumGroups << "\n");
+ LLVM_DEBUG(dbgs() << "NumGroups: " << NumGroups << "\n");
assert(CurrentGroup->empty() && "The last group wasn't properly processed");
return OptRules;
}
More information about the llvm-commits
mailing list