llvm-project/llvm/lib/CodeGen/SelectionDAG
Chandler Carruth e96dd8975f [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.

llvm-svn: 206822
2014-04-21 22:55:11 +00:00
..
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
DAGCombiner.cpp DAGCombiner: don't optimise non-existant litpool load 2014-04-16 09:03:09 +00:00
FastISel.cpp Patch by Vadim Chugunov 2014-04-19 13:47:43 +00:00
FunctionLoweringInfo.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
InstrEmitter.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
InstrEmitter.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
LegalizeDAG.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
LegalizeFloatTypes.cpp [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into the 2014-04-21 19:43:07 +00:00
LegalizeIntegerTypes.cpp [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into the 2014-04-21 19:43:07 +00:00
LegalizeTypes.cpp [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into the 2014-04-21 19:43:07 +00:00
LegalizeTypes.h [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into the 2014-04-21 19:43:07 +00:00
LegalizeTypesGeneric.cpp [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into the 2014-04-21 19:43:07 +00:00
LegalizeVectorOps.cpp [VectorLegalizer/X86] Don't unvectorize fp_to_uint for v8f32->v8i16 2014-03-17 17:06:14 +00:00
LegalizeVectorTypes.cpp [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into the 2014-04-21 19:43:07 +00:00
Makefile
ResourcePriorityQueue.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
SDNodeDbgValue.h [Layering] Move DebugLoc.h into the IR library. The implementation 2014-03-05 10:30:38 +00:00
ScheduleDAGFast.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
ScheduleDAGRRList.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
ScheduleDAGSDNodes.cpp Convert SelectionDAG::getVTList to use ArrayRef 2014-04-16 06:10:51 +00:00
ScheduleDAGSDNodes.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-16 04:21:27 +00:00
ScheduleDAGVLIW.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
SelectionDAG.cpp Convert SelectionDAG::getVTList to use ArrayRef 2014-04-16 06:10:51 +00:00
SelectionDAGBuilder.cpp Fix unnecessary line break 2014-04-21 18:39:13 +00:00
SelectionDAGBuilder.h Patch by Vadim Chugunov 2014-04-19 13:47:43 +00:00
SelectionDAGDumper.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
SelectionDAGISel.cpp Convert SelectionDAG::getVTList to use ArrayRef 2014-04-16 06:10:51 +00:00
SelectionDAGPrinter.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
TargetLowering.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
TargetSelectionDAGInfo.cpp Rename some member variables from TD to DL. 2014-02-18 15:33:12 +00:00