[llvm] r307840 - Remove unneeded use of #undef DEBUG_TYPE. NFC
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 13:49:21 PDT 2017
Author: sbc
Date: Wed Jul 12 13:49:21 2017
New Revision: 307840
URL: http://llvm.org/viewvc/llvm-project?rev=307840&view=rev
Log:
Remove unneeded use of #undef DEBUG_TYPE. NFC
Where is is needed (at the end of headers that define it), be
consistent about its use.
Also fix a few header guards that I found in the process.
Differential Revision: https://reviews.llvm.org/D34916
Modified:
llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h
llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
llvm/trunk/include/llvm/Support/UnicodeCharRanges.h
llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp
llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h
llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h
Modified: llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h Wed Jul 12 13:49:21 2017
@@ -1353,4 +1353,4 @@ struct BFIDOTGraphTraitsBase : public De
#undef DEBUG_TYPE
-#endif
+#endif // LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H
Modified: llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h Wed Jul 12 13:49:21 2017
@@ -34,10 +34,10 @@
#include <type_traits>
#include <vector>
-namespace llvm {
-
#define DEBUG_TYPE "region"
+namespace llvm {
+
//===----------------------------------------------------------------------===//
/// RegionBase Implementation
template <class Tr>
@@ -901,8 +901,8 @@ void RegionInfoBase<Tr>::calculate(FuncT
buildRegionsTree(DT->getNode(BB), TopLevelRegion);
}
-#undef DEBUG_TYPE
-
} // end namespace llvm
+#undef DEBUG_TYPE
+
#endif // LLVM_ANALYSIS_REGIONINFOIMPL_H
Modified: llvm/trunk/include/llvm/Support/UnicodeCharRanges.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/UnicodeCharRanges.h?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/UnicodeCharRanges.h (original)
+++ llvm/trunk/include/llvm/Support/UnicodeCharRanges.h Wed Jul 12 13:49:21 2017
@@ -18,11 +18,11 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+#define DEBUG_TYPE "unicode"
+
namespace llvm {
namespace sys {
-#define DEBUG_TYPE "unicode"
-
/// \brief Represents a closed range of Unicode code points [Lower, Upper].
struct UnicodeCharRange {
uint32_t Lower;
@@ -99,10 +99,9 @@ private:
const CharRanges Ranges;
};
-#undef DEBUG_TYPE // "unicode"
-
} // namespace sys
} // namespace llvm
+#undef DEBUG_TYPE // "unicode"
#endif // LLVM_SUPPORT_UNICODECHARRANGES_H
Modified: llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h Wed Jul 12 13:49:21 2017
@@ -22,10 +22,10 @@
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Debug.h"
-namespace llvm {
-
#define DEBUG_TYPE "ssaupdater"
+namespace llvm {
+
class CastInst;
class PHINode;
template<typename T> class SSAUpdaterTraits;
@@ -453,8 +453,8 @@ public:
}
};
-#undef DEBUG_TYPE // "ssaupdater"
+} // end llvm namespace
-} // End llvm namespace
+#undef DEBUG_TYPE // "ssaupdater"
-#endif
+#endif // LLVM_TRANSFORMS_UTILS_SSAUPDATERIMPL_H
Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Wed Jul 12 13:49:21 2017
@@ -924,5 +924,3 @@ FunctionPass *llvm::createPBQPRegisterAl
FunctionPass* llvm::createDefaultPBQPRegisterAllocator() {
return createPBQPRegisterAllocator();
}
-
-#undef DEBUG_TYPE
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp Wed Jul 12 13:49:21 2017
@@ -62,7 +62,6 @@
#include <utility>
#include <vector>
-#undef DEBUG_TYPE
#define DEBUG_TYPE "nvptx-lower"
using namespace llvm;
Modified: llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h Wed Jul 12 13:49:21 2017
@@ -12,6 +12,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIB_TRANSFORMS_INSTRUMENTATION_CFGMST_H
+#define LLVM_LIB_TRANSFORMS_INSTRUMENTATION_CFGMST_H
+
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
@@ -24,10 +27,10 @@
#include <utility>
#include <vector>
-namespace llvm {
-
#define DEBUG_TYPE "cfgmst"
+namespace llvm {
+
/// \brief An union-find based Minimum Spanning Tree for CFG
///
/// Implements a Union-find algorithm to compute Minimum Spanning Tree
@@ -220,5 +223,8 @@ public:
}
};
-#undef DEBUG_TYPE // "cfgmst"
} // end namespace llvm
+
+#undef DEBUG_TYPE // "cfgmst"
+
+#endif // LLVM_LIB_TRANSFORMS_INSTRUMENTATION_CFGMST_H
Modified: llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h?rev=307840&r1=307839&r2=307840&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/MaximumSpanningTree.h Wed Jul 12 13:49:21 2017
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_ANALYSIS_MAXIMUMSPANNINGTREE_H
-#define LLVM_ANALYSIS_MAXIMUMSPANNINGTREE_H
+#ifndef LLVM_LIB_TRANSFORMS_INSTRUMENTATION_MAXIMUMSPANNINGTREE_H
+#define LLVM_LIB_TRANSFORMS_INSTRUMENTATION_MAXIMUMSPANNINGTREE_H
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/IR/BasicBlock.h"
@@ -108,4 +108,4 @@ namespace llvm {
} // End llvm namespace
-#endif
+#endif // LLVM_LIB_TRANSFORMS_INSTRUMENTATION_MAXIMUMSPANNINGTREE_H
More information about the llvm-commits
mailing list