[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE

definition below all of the header #include lines, TableGen edition.

llvm-svn: 206846
This commit is contained in:
Chandler Carruth 2014-04-22 03:06:00 +00:00
parent f58e376d23
commit 97acce29f0
7 changed files with 14 additions and 12 deletions

View File

@ -13,8 +13,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "ctags-emitter"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TableGen/Error.h"
@ -24,6 +22,8 @@
#include <vector>
using namespace llvm;
#define DEBUG_TYPE "ctags-emitter"
namespace llvm { extern SourceMgr SrcMgr; }
namespace {

View File

@ -12,8 +12,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "regalloc-emitter"
#include "CodeGenRegisters.h"
#include "CodeGenTarget.h"
#include "llvm/ADT/IntEqClasses.h"
@ -26,6 +24,8 @@
using namespace llvm;
#define DEBUG_TYPE "regalloc-emitter"
//===----------------------------------------------------------------------===//
// CodeGenSubRegIndex
//===----------------------------------------------------------------------===//

View File

@ -12,8 +12,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "subtarget-emitter"
#include "CodeGenSchedule.h"
#include "CodeGenTarget.h"
#include "llvm/ADT/STLExtras.h"
@ -23,6 +21,8 @@
using namespace llvm;
#define DEBUG_TYPE "subtarget-emitter"
#ifndef NDEBUG
static void dumpIdxVec(const IdxVec &V) {
for (unsigned i = 0, e = V.size(); i < e; ++i) {

View File

@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "isel-opt"
#include "DAGISelMatcher.h"
#include "CodeGenDAGPatterns.h"
#include "llvm/ADT/DenseSet.h"
@ -20,6 +19,8 @@
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
#define DEBUG_TYPE "isel-opt"
/// ContractNodes - Turn multiple matcher node patterns like 'MoveChild+Record'
/// into single compound nodes like RecordChild.
static void ContractNodes(std::unique_ptr<Matcher> &MatcherPtr,

View File

@ -12,8 +12,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "decoder-emitter"
#include "CodeGenTarget.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallString.h"
@ -34,6 +32,8 @@
using namespace llvm;
#define DEBUG_TYPE "decoder-emitter"
namespace {
struct EncodingField {
unsigned Base, Width, Offset;

View File

@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "pseudo-lowering"
#include "CodeGenInstruction.h"
#include "CodeGenTarget.h"
#include "llvm/ADT/IndexedMap.h"
@ -21,6 +20,8 @@
#include <vector>
using namespace llvm;
#define DEBUG_TYPE "pseudo-lowering"
namespace {
class PseudoLoweringEmitter {
struct OpData {

View File

@ -11,8 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "subtarget-emitter"
#include "CodeGenTarget.h"
#include "CodeGenSchedule.h"
#include "llvm/ADT/STLExtras.h"
@ -29,6 +27,8 @@
#include <vector>
using namespace llvm;
#define DEBUG_TYPE "subtarget-emitter"
namespace {
class SubtargetEmitter {
// Each processor has a SchedClassDesc table with an entry for each SchedClass.