forked from OSchip/llvm-project
[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:
parent
64e48d72f4
commit
9afe32d11d
|
@ -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 &);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue