diff options
Diffstat (limited to 'include/llvm/DebugInfo/PDB/DIA/DIASupport.h')
-rw-r--r-- | include/llvm/DebugInfo/PDB/DIA/DIASupport.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo/PDB/DIA/DIASupport.h b/include/llvm/DebugInfo/PDB/DIA/DIASupport.h index 407a34551cc74..3b4a348289df9 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIASupport.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIASupport.h @@ -22,6 +22,14 @@ #define NOMINMAX #endif +// llvm/Support/Debug.h unconditionally #defines DEBUG as a macro. +// DIA headers #define it if it is not already defined, so we have +// an order of includes problem. The real fix is to make LLVM use +// something less generic than DEBUG, such as LLVM_DEBUG(), but it's +// fairly prevalent. So for now, we save the definition state and +// restore it. +#pragma push_macro("DEBUG") + // atlbase.h has to come before windows.h #include <atlbase.h> #include <windows.h> @@ -29,5 +37,8 @@ // DIA headers must come after windows headers. #include <cvconst.h> #include <dia2.h> +#include <diacreate.h> + +#pragma pop_macro("DEBUG") #endif // LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H |