1 //===- DIASupport.h - Common header includes for DIA ------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // Common defines and header includes for all LLVMDebugInfoPDBDIA. The 10 // definitions here configure the necessary #defines and include system headers 11 // in the proper order for using DIA. 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H 15 #define LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H 16 17 // Require at least Vista 18 #define NTDDI_VERSION NTDDI_VISTA 19 #define _WIN32_WINNT _WIN32_WINNT_VISTA 20 #define WINVER _WIN32_WINNT_VISTA 21 #ifndef NOMINMAX 22 #define NOMINMAX 23 #endif 24 25 // llvm/Support/Debug.h unconditionally #defines DEBUG as a macro. 26 // DIA headers #define it if it is not already defined, so we have 27 // an order of includes problem. The real fix is to make LLVM use 28 // something less generic than DEBUG, such as LLVM_DEBUG(), but it's 29 // fairly prevalent. So for now, we save the definition state and 30 // restore it. 31 #pragma push_macro("DEBUG") 32 33 // atlbase.h has to come before windows.h 34 #include <atlbase.h> 35 #include <windows.h> 36 37 // DIA headers must come after windows headers. 38 #include <cvconst.h> 39 #include <dia2.h> 40 #include <diacreate.h> 41 42 #pragma pop_macro("DEBUG") 43 44 #endif // LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H 45