From 7df256add2ae9fb916c3e0f80c879e42d1c8a7a0 Mon Sep 17 00:00:00 2001 From: Shawn Starr Date: Fri, 13 Feb 2015 21:16:17 -0500 Subject: [PATCH] clover: Use Legacy PassManager for LLVM trunk (3.7) Reviewed-by: Tom Stellard Signed-off-by: Shawn Starr --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 #endif +#if HAVE_LLVM >= 0x0307 +#include +#else #include +#endif #include #include #include @@ -298,7 +302,12 @@ namespace { optimize(llvm::Module *mod, unsigned optimization_level, const std::vector &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 -- 2.30.2