As of version 7, LLVM uses LLVM_DEBUG instead of just DEBUG.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
#pragma warning(disable : 4146 4244 4267 4800 4996)
#endif
+#include <llvm/Config/llvm-config.h>
+
+#if LLVM_VERSION_MAJOR < 7
// llvm 3.7+ reuses "DEBUG" as an enum value
#pragma push_macro("DEBUG")
#undef DEBUG
+#endif
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/ExecutionEngine/ObjectCache.h"
-#include "llvm/Config/llvm-config.h"
-
#include "llvm/IR/Verifier.h"
#include "llvm/ExecutionEngine/MCJIT.h"
#include "llvm/Support/FileSystem.h"
}
#endif
+#if LLVM_VERSION_MAJOR < 7
#pragma pop_macro("DEBUG")
+#endif
#include <deque>
#include <list>
* IN THE SOFTWARE.
***************************************************************************/
+#include <llvm/Config/llvm-config.h>
+
+#if LLVM_VERSION_MAJOR < 7
// llvm redefines DEBUG
#pragma push_macro("DEBUG")
#undef DEBUG
+#endif
+
#include "JitManager.h"
-#include <llvm/Config/llvm-config.h>
#include "llvm-c/Core.h"
#include "llvm/Support/CBindingWrapping.h"
#include "llvm/IR/LegacyPassManager.h"
+
+#if LLVM_VERSION_MAJOR < 7
#pragma pop_macro("DEBUG")
+#endif
#include "state.h"
#include "gen_state_llvm.h"
* IN THE SOFTWARE.
***************************************************************************/
+#include <llvm/Config/llvm-config.h>
+
+#if LLVM_VERSION_MAJOR < 7
// llvm redefines DEBUG
#pragma push_macro("DEBUG")
#undef DEBUG
+#endif
#include <rasterizer/core/state.h>
#include "JitManager.h"
+
+#if LLVM_VERSION_MAJOR < 7
#pragma pop_macro("DEBUG")
+#endif
#include "common/os.h"
#include "jit_api.h"