llvm-6502/tools
Chandler Carruth 283b399377 [Modules] Make Support/Debug.h modular. This requires it to not change
behavior based on other files defining DEBUG_TYPE, which means it cannot
define DEBUG_TYPE at all. This is actually better IMO as it forces folks
to define relevant DEBUG_TYPEs for their files. However, it requires all
files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't
already. I've updated all such files in LLVM and will do the same for
other upstream projects.

This still leaves one important change in how LLVM uses the DEBUG_TYPE
macro going forward: we need to only define the macro *after* header
files have been #include-ed. Previously, this wasn't possible because
Debug.h required the macro to be pre-defined. This commit removes that.
By defining DEBUG_TYPE after the includes two things are fixed:

- Header files that need to provide a DEBUG_TYPE for some inline code
  can do so by defining the macro before their inline code and undef-ing
  it afterward so the macro does not escape.

- We no longer have rampant ODR violations due to including headers with
  different DEBUG_TYPE definitions. This may be mostly an academic
  violation today, but with modules these types of violations are easy
  to check for and potentially very relevant.

Where necessary to suppor headers with DEBUG_TYPE, I have moved the
definitions below the includes in this commit. I plan to move the rest
of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big
enough.

The comments in Debug.h, which were hilariously out of date already,
have been updated to reflect the recommended practice going forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206822 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-21 22:55:11 +00:00
..
bugpoint [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
bugpoint-passes [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
gold Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llc llc: Add support for -mcpu=native. 2014-04-12 01:34:31 +00:00
lli [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
llvm-ar Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-as Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-bcanalyzer Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-c-test Convert getFileOffset to getOffset and move it to its only user. 2014-04-21 13:45:32 +00:00
llvm-config Windows: canonicalise the default windows triple 2014-03-29 01:08:53 +00:00
llvm-cov Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-diff [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-dis [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-dwarfdump [DWARF parser] Turn DILineInfo into a struct. 2014-04-18 21:36:39 +00:00
llvm-extract Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-jitlistener Support: split object format out of environment 2014-03-06 20:47:11 +00:00
llvm-link Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-lto Teach llvm-lto to respect the given RelocModel. 2014-04-14 13:54:16 +00:00
llvm-mc [MC] Require an MCContext when constructing an MCDisassembler. 2014-04-15 04:40:56 +00:00
llvm-mcmarkup Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-nm Revert "Fix a nomenclature error in llvm-nm." 2014-04-03 00:19:35 +00:00
llvm-objdump [DWARF parser] Turn DILineInfo into a struct. 2014-04-18 21:36:39 +00:00
llvm-profdata ProfileData: Add support for the indexed instrprof format 2014-04-18 21:48:40 +00:00
llvm-readobj [C++11] Range-based loop simplification. 2014-04-20 21:05:30 +00:00
llvm-rtdyld [DWARF parser] Turn DILineInfo into a struct. 2014-04-18 21:36:39 +00:00
llvm-shlib Add patch level to llvm version in CMake and Autoconf 2014-03-03 15:22:00 +00:00
llvm-size [C++11] Use ObjectFile::sections() in commandline llvm tools 2014-03-13 14:37:36 +00:00
llvm-stress verify-di: Implement DebugInfoVerifier 2014-04-15 16:27:38 +00:00
llvm-symbolizer [DWARF parser] Turn DILineInfo into a struct. 2014-04-18 21:36:39 +00:00
lto Revert "Reapply "LTO: add API to set strategy for -internalize"" 2014-04-02 22:05:57 +00:00
macho-dump Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
msbuild VS integration installer: set SUCCESS=1 if we find VS 2013 2014-03-24 17:33:22 +00:00
obj2yaml Object: Output .file symbols properly 2014-03-20 06:29:02 +00:00
opt [PM] Add a new-PM-style CGSCC pass manager using the newly added 2014-04-21 11:12:00 +00:00
yaml2obj [yaml2obj][ELF] ELF Relocations Support. 2014-04-11 04:13:39 +00:00
CMakeLists.txt static link polly into tools 2014-03-14 04:04:14 +00:00
LLVMBuild.txt PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
Makefile PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00