[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE

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

IF you want to know more details about this, you can see the recent
commits to Debug.h in LLVM. This is just the LLD segment of a cleanup
I'm doing globally for this macro.

llvm-svn: 206851
This commit is contained in:
Chandler Carruth 2014-04-22 03:21:31 +00:00
parent 64e48d72f4
commit 9afe32d11d
6 changed files with 12 additions and 12 deletions

View File

@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "LayoutPass"
#include <algorithm>
#include <set>
@ -20,6 +18,8 @@
using namespace lld;
#define DEBUG_TYPE "LayoutPass"
static bool compareAtoms(const LayoutPass::SortKey &,
const LayoutPass::SortKey &);

View File

@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "RoundTripNativePass"
#include "lld/Core/Instrumentation.h"
#include "lld/Passes/RoundTripNativePass.h"
#include "lld/ReaderWriter/Simple.h"
@ -21,6 +19,8 @@
using namespace lld;
#define DEBUG_TYPE "RoundTripNativePass"
/// Perform the actual pass
void RoundTripNativePass::perform(std::unique_ptr<MutableFile> &mergedFile) {
ScopedTask task(getDefaultDomain(), "RoundTripNativePass");

View File

@ -6,8 +6,6 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "RoundTripYAMLPass"
#include "lld/Core/Instrumentation.h"
#include "lld/Passes/RoundTripYAMLPass.h"
#include "lld/ReaderWriter/Simple.h"
@ -20,6 +18,8 @@
using namespace lld;
#define DEBUG_TYPE "RoundTripYAMLPass"
/// Perform the actual pass
void RoundTripYAMLPass::perform(std::unique_ptr<MutableFile> &mergedFile) {
ScopedTask task(getDefaultDomain(), "RoundTripYAMLPass");

View File

@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "ReaderCOFF"
#include "Atoms.h"
#include "ReaderImportHeader.h"
@ -38,6 +36,8 @@
#include <set>
#include <vector>
#define DEBUG_TYPE "ReaderCOFF"
using std::vector;
using lld::pecoff::COFFAbsoluteAtom;
using lld::pecoff::COFFBSSAtom;

View File

@ -118,8 +118,6 @@
///
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "ReaderImportHeader"
#include "Atoms.h"
#include "lld/Core/File.h"
@ -147,6 +145,8 @@ using namespace lld;
using namespace lld::pecoff;
using namespace llvm;
#define DEBUG_TYPE "ReaderImportHeader"
namespace lld {
namespace {

View File

@ -19,8 +19,6 @@
///
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "WriterPECOFF"
#include "Atoms.h"
#include "WriterImportLibrary.h"
@ -46,6 +44,8 @@
#include <time.h>
#include <vector>
#define DEBUG_TYPE "WriterPECOFF"
using llvm::COFF::DataDirectoryIndex;
using llvm::object::coff_runtime_function_x64;
using llvm::support::ulittle16_t;