summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorShawn Starr <[email protected]>2015-02-13 21:16:17 -0500
committerTom Stellard <[email protected]>2015-02-14 01:31:57 +0000
commit7df256add2ae9fb916c3e0f80c879e42d1c8a7a0 (patch)
tree6fd099b61f63d00d2118ff691d3fa50b540dac26 /src/gallium/state_trackers
parent8323796840a343ee39687cc8e8b424ee43d6fee7 (diff)
clover: Use Legacy PassManager for LLVM trunk (3.7)
Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Shawn Starr <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 0794e6156de..508979a0225 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -44,7 +44,11 @@
#if HAVE_LLVM < 0x0305
#include <llvm/ADT/OwningPtr.h>
#endif
+#if HAVE_LLVM >= 0x0307
+#include <llvm/IR/LegacyPassManager.h>
+#else
#include <llvm/PassManager.h>
+#endif
#include <llvm/Support/CodeGen.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Support/MemoryBuffer.h>
@@ -298,7 +302,12 @@ namespace {
optimize(llvm::Module *mod, unsigned optimization_level,
const std::vector<llvm::Function *> &kernels) {
+#if HAVE_LLVM >= 0x0307
+ llvm::legacy::PassManager PM;
+#else
llvm::PassManager PM;
+#endif
+
// Add a function internalizer pass.
//
// By default, the function internalizer pass will look for a function