summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2013-03-20 17:22:58 -0500
committerAaron Watry <awatry@gmail.com>2013-04-11 18:19:30 -0500
commitf617f2dfa68e06472761c7b2b86af17a36e154f7 (patch)
treeb277a250b03f3cf187928741480b0d90d6c7ff24 /utils
parent86ade207e7792d39ec7af60a6bc62106e2dd7f3c (diff)
libclc: Fix libclc build for LLVM 3.3
LLVM moved a bunch of IR-related headers for version 3.3. This fixes the libclc build to follow suit.
Diffstat (limited to 'utils')
-rw-r--r--utils/prepare-builtins.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
index be1624b..0141484 100644
--- a/utils/prepare-builtins.cpp
+++ b/utils/prepare-builtins.cpp
@@ -1,9 +1,21 @@
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Bitcode/ReaderWriter.h"
+
+#ifndef HAVE_LLVM
+#include "llvm/Config/config.h"
+#define HAVE_LLVM ((LLVM_VERSION_MAJOR << 8)|LLVM_VERSION_MINOR)
+#endif
+#if HAVE_LLVM < 0x0303
+#include "llvm/Function.h"
+#include "llvm/GlobalVariable.h"
+#include "llvm/LLVMContext.h"
+#include "llvm/Module.h"
+#else
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
+#endif
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"