summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Zaghen <nicola.zaghen@imgtec.com>2018-05-23 15:09:29 +0000
committerNicola Zaghen <nicola.zaghen@imgtec.com>2018-05-23 15:09:29 +0000
commit03d0b91f43319d02ec416489118726b8dee9801a (patch)
treea5c49fbab9b2eb667c9d3921a5163e9ab2b77cf9
parent2e171b52eeac53d4ece15816688b8c259cd1fea1 (diff)
downloadbcm5719-llvm-03d0b91f43319d02ec416489118726b8dee9801a.tar.gz
bcm5719-llvm-03d0b91f43319d02ec416489118726b8dee9801a.zip
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 llvm-svn: 333091
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h10
-rw-r--r--llvm/include/llvm/Support/Debug.h2
-rw-r--r--llvm/lib/Target/X86/X86DomainReassignment.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/MergeFunctions.cpp4
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp4
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp2
-rw-r--r--llvm/utils/TableGen/GlobalISelEmitter.cpp2
7 files changed, 7 insertions, 19 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
index 3b4a348289d..92ebc04ae5a 100644
--- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
@@ -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
diff --git a/llvm/include/llvm/Support/Debug.h b/llvm/include/llvm/Support/Debug.h
index 59a5b0a70e4..980abfb0e8d 100644
--- a/llvm/include/llvm/Support/Debug.h
+++ b/llvm/include/llvm/Support/Debug.h
@@ -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
diff --git a/llvm/lib/Target/X86/X86DomainReassignment.cpp b/llvm/lib/Target/X86/X86DomainReassignment.cpp
index 45635252249..5196446b39e 100644
--- a/llvm/lib/Target/X86/X86DomainReassignment.cpp
+++ b/llvm/lib/Target/X86/X86DomainReassignment.cpp
@@ -753,7 +753,7 @@ bool X86DomainReassignment::runOnMachineFunction(MachineFunction &MF) {
}
for (Closure &C : Closures) {
- DEBUG(C.dump(MRI));
+ LLVM_DEBUG(C.dump(MRI));
if (isReassignmentProfitable(C, MaskDomain)) {
reassign(C, MaskDomain);
++NumClosuresConverted;
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index 929d4fd86eb..208c50d508d 100644
--- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -645,8 +645,8 @@ void MergeFunctions::filterInstsUnrelatedToPDI(
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;
}
}
diff --git a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
index 3edf6d306a2..4eb0a5d4cef 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
@@ -116,7 +116,7 @@ VPBasicBlock *PlainCFGBuilder::getOrCreateVPBB(BasicBlock *BB) {
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::buildHierarchicalCFG(VPlan &Plan) {
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);
}
diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
index 59a11f23baf..83c7d236bf7 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
@@ -120,7 +120,7 @@ void VPlanVerifier::verifyHierarchicalCFG(
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);
}
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp
index cf0854b608e..9367b5da838 100644
--- a/llvm/utils/TableGen/GlobalISelEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp
@@ -4063,7 +4063,7 @@ std::vector<Matcher *> GlobalISelEmitter::optimizeRules(
}
ProcessCurrentGroup();
- DEBUG(dbgs() << "NumGroups: " << NumGroups << "\n");
+ LLVM_DEBUG(dbgs() << "NumGroups: " << NumGroups << "\n");
assert(CurrentGroup->empty() && "The last group wasn't properly processed");
return OptRules;
}
OpenPOWER on IntegriCloud