From: Shawn Starr Date: Sat, 14 Feb 2015 02:16:17 +0000 (-0500) Subject: clover: Use Legacy PassManager for LLVM trunk (3.7) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7df256add2ae9fb916c3e0f80c879e42d1c8a7a0;p=mesa.git clover: Use Legacy PassManager for LLVM trunk (3.7) Reviewed-by: Tom Stellard Signed-off-by: Shawn Starr --- 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