[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE

definition below all the header #include lines. This updates most of the
miscellaneous other lib/... directories. A few left though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2014-04-22 03:04:17 +00:00
parent 7962dbdc65
commit 0d338a59bd
15 changed files with 30 additions and 17 deletions

View File

@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "jit"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Statistic.h"
@ -37,6 +36,8 @@
#include <cstring>
using namespace llvm;
#define DEBUG_TYPE "jit"
STATISTIC(NumInitBytes, "Number of bytes of global vars initialized");
STATISTIC(NumGlobals , "Number of global vars initialized");

View File

@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "jit"
#include "llvm-c/ExecutionEngine.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
@ -23,6 +22,8 @@
using namespace llvm;
#define DEBUG_TYPE "jit"
// Wrapping the C bindings types.
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(GenericValue, LLVMGenericValueRef)

View File

@ -15,7 +15,6 @@
#include "llvm/Config/config.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#define DEBUG_TYPE "amplifier-jit-event-listener"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
@ -34,6 +33,8 @@
using namespace llvm;
using namespace llvm::jitprofiling;
#define DEBUG_TYPE "amplifier-jit-event-listener"
namespace {
class IntelJITEventListener : public JITEventListener {

View File

@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "interpreter"
#include "Interpreter.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/Statistic.h"
@ -28,6 +27,8 @@
#include <cmath>
using namespace llvm;
#define DEBUG_TYPE "interpreter"
STATISTIC(NumDynamicInsts, "Number of dynamic instructions executed");
static cl::opt<bool> PrintVolatile("interpreter-print-volatile", cl::Hidden,

View File

@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "jit"
#include "JIT.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
@ -52,6 +51,8 @@
#endif
using namespace llvm;
#define DEBUG_TYPE "jit"
STATISTIC(NumBytes, "Number of bytes of machine code compiled");
STATISTIC(NumRelos, "Number of relocations applied");
STATISTIC(NumRetries, "Number of retries with more memory");

View File

@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "jit"
#include "llvm/ExecutionEngine/JITMemoryManager.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
@ -40,6 +39,8 @@
using namespace llvm;
#define DEBUG_TYPE "jit"
STATISTIC(NumSlabs, "Number of slabs of memory allocated by the JIT");
JITMemoryManager::~JITMemoryManager() {}

View File

@ -15,7 +15,6 @@
#include "llvm/Config/config.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#define DEBUG_TYPE "oprofile-jit-event-listener"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/CodeGen/MachineFunction.h"
@ -33,6 +32,8 @@
using namespace llvm;
using namespace llvm::jitprofiling;
#define DEBUG_TYPE "oprofile-jit-event-listener"
namespace {
class OProfileJITEventListener : public JITEventListener {

View File

@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "oprofile-wrapper"
#include "llvm/ExecutionEngine/OProfileWrapper.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Debug.h"
@ -29,6 +28,8 @@
#include <sys/stat.h>
#include <unistd.h>
#define DEBUG_TYPE "oprofile-wrapper"
namespace {
// Global mutex to ensure a single thread initializes oprofile agent.

View File

@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "dyld"
#include "llvm/ExecutionEngine/RuntimeDyld.h"
#include "JITRegistrar.h"
#include "ObjectImageCommon.h"
@ -25,6 +24,8 @@
using namespace llvm;
using namespace llvm::object;
#define DEBUG_TYPE "dyld"
// Empty out-of-line virtual destructor as the key function.
RuntimeDyldImpl::~RuntimeDyldImpl() {}

View File

@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "dyld"
#include "RuntimeDyldELF.h"
#include "JITRegistrar.h"
#include "ObjectImageCommon.h"
@ -29,6 +28,8 @@
using namespace llvm;
using namespace llvm::object;
#define DEBUG_TYPE "dyld"
namespace {
static inline error_code check(error_code Err) {

View File

@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "dyld"
#include "RuntimeDyldMachO.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
using namespace llvm;
using namespace llvm::object;
#define DEBUG_TYPE "dyld"
namespace llvm {
static unsigned char *processFDE(unsigned char *P, intptr_t DeltaForText,

View File

@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "assembler"
#include "llvm/MC/MCAssembler.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
@ -31,6 +30,8 @@
using namespace llvm;
#define DEBUG_TYPE "assembler"
namespace {
namespace stats {
STATISTIC(EmittedFragments, "Number of emitted assembler fragments - total");

View File

@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "mcexpr"
#include "llvm/MC/MCExpr.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringSwitch.h"
@ -23,6 +22,8 @@
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
#define DEBUG_TYPE "mcexpr"
namespace {
namespace stats {
STATISTIC(MCExprEvaluate, "Number of MCExpr evaluations");

View File

@ -11,8 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "WinCOFFObjectWriter"
#include "llvm/MC/MCWinCOFFObjectWriter.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
@ -36,6 +34,8 @@
using namespace llvm;
#define DEBUG_TYPE "WinCOFFObjectWriter"
namespace {
typedef SmallString<COFF::NameSize> name;

View File

@ -11,8 +11,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "WinCOFFStreamer"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmLayout.h"
@ -35,6 +33,8 @@
using namespace llvm;
#define DEBUG_TYPE "WinCOFFStreamer"
namespace {
class WinCOFFStreamer : public MCObjectStreamer {
public: