llvm-6502/lib/MC
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
..
MCDisassembler [MC] Require an MCContext when constructing an MCDisassembler. 2014-04-15 04:40:56 +00:00
MCParser
CMakeLists.txt
ELFObjectWriter.cpp Add parens to appease GCC warning. 2014-04-19 00:50:15 +00:00
LLVMBuild.txt
MachObjectWriter.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
Makefile
MCAsmBackend.cpp
MCAsmInfo.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmStreamer.cpp Patch by Ray Donnelly to print register names instead of numbers. 2014-04-19 05:40:09 +00:00
MCAssembler.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCAtom.cpp
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCDisassembler.cpp
MCDwarf.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCELF.cpp
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCExpr.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCExternalSymbolizer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCFixup.cpp Remove a variable from r206192 that is only used in an assert. 2014-04-14 17:21:50 +00:00
MCFunction.cpp Use std::unique_ptr to manage MCBasicBlocks in MCFunction. 2014-04-15 04:56:29 +00:00
MCInst.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Add range access to MCAssembler's symbol collection. 2014-04-18 18:24:25 +00:00
MCModule.cpp Use unique_ptr to own MCFunctions within MCModule. 2014-04-15 05:15:19 +00:00
MCModuleYAML.cpp Use unique_ptr to own MCFunctions within MCModule. 2014-04-15 05:15:19 +00:00
MCNullStreamer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCObjectDisassembler.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
MCObjectFileInfo.cpp AArch64/ARM64: port across stub handling for ELF C++ exceptions. 2014-04-16 11:52:55 +00:00
MCObjectStreamer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCObjectSymbolizer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCObjectWriter.cpp
MCRegisterInfo.cpp
MCRelocationInfo.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCSection.cpp
MCSectionCOFF.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCSectionELF.cpp
MCSectionMachO.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCStreamer.cpp [MC] Emit an error if cfi_startproc is used before a symbol is defined. 2014-04-15 01:17:45 +00:00
MCSubtargetInfo.cpp
MCSymbol.cpp
MCSymbolizer.cpp
MCValue.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCWin64EH.cpp
SubtargetFeature.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
WinCOFFObjectWriter.cpp Add range access to MCAssembler's symbol collection. 2014-04-18 18:24:25 +00:00
WinCOFFStreamer.cpp COFF: add support for .file symbols 2014-04-16 04:15:32 +00:00