[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
authorChandler Carruth <chandlerc@gmail.com>
Tue, 22 Apr 2014 03:07:47 +0000 (03:07 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 22 Apr 2014 03:07:47 +0000 (03:07 +0000)
definition below all of the header #include lines, lib/Support edition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206847 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp
lib/Support/DataStream.cpp

index 6dafe9ec3c329a1dd240cdb55838e592ae539664..fa929eb0a556e0054d1209192b121d66b1b070c0 100644 (file)
@@ -12,7 +12,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define DEBUG_TYPE "apint"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/Hashing.h"
@@ -28,6 +27,8 @@
 #include <limits>
 using namespace llvm;
 
+#define DEBUG_TYPE "apint"
+
 /// A utility function for allocating memory, checking for allocation failures,
 /// and ensuring the contents are zeroed.
 inline static uint64_t* getClearedMemory(unsigned numWords) {
index cb36d9c0c02737a758aee611824e3976616430d0..eec858416a8f9145786f7703de3bac13c182797c 100644 (file)
@@ -14,7 +14,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define DEBUG_TYPE "Data-stream"
 #include "llvm/Support/DataStream.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/FileSystem.h"
@@ -30,6 +29,8 @@
 #endif
 using namespace llvm;
 
+#define DEBUG_TYPE "Data-stream"
+
 // Interface goals:
 // * StreamableMemoryObject doesn't care about complexities like using
 //   threads/async callbacks to actually overlap download+compile