diff options
author | Tom Stellard <[email protected]> | 2013-06-27 09:41:34 -0700 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-06-27 10:03:33 -0700 |
commit | 0e990736f34c43f553d4516bc6ffb8fe521e3806 (patch) | |
tree | 2e2e0fd4266dc8e7944e6273f0700cb1b8be22e9 /src/gallium/state_trackers/clover/llvm | |
parent | 191795eaf13a75a2395a6c085a10751124c53a02 (diff) |
clover: Fix build with LLVM 3.4
Reported on IRC by lordheavy
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm')
-rw-r--r-- | src/gallium/state_trackers/clover/llvm/invocation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 2d115ed0b44..90bc53b238c 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -43,7 +43,9 @@ #include <llvm/PassManager.h> #include <llvm/Support/TargetSelect.h> #include <llvm/Support/MemoryBuffer.h> +#if HAVE_LLVM < 0x0303 #include <llvm/Support/PathV1.h> +#endif #include <llvm/Transforms/IPO.h> #include <llvm/Transforms/IPO/PassManagerBuilder.h> @@ -222,20 +224,18 @@ namespace { llvm::PassManager PM; llvm::PassManagerBuilder Builder; - llvm::sys::Path libclc_path = - llvm::sys::Path(LIBCLC_LIBEXECDIR + processor + - "-" + triple + ".bc"); - + std::string libclc_path = LIBCLC_LIBEXECDIR + processor + "-" + + triple + ".bc"; // Link the kernel with libclc #if HAVE_LLVM < 0x0303 bool isNative; llvm::Linker linker("clover", mod); - linker.LinkInFile(libclc_path, isNative); + linker.LinkInFile(llvm::sys::Path(libclc_path), isNative); mod = linker.releaseModule(); #else std::string err_str; llvm::SMDiagnostic err; - llvm::Module *libclc_mod = llvm::ParseIRFile(libclc_path.str(), err, + llvm::Module *libclc_mod = llvm::ParseIRFile(libclc_path, err, mod->getContext()); if (llvm::Linker::LinkModules(mod, libclc_mod, llvm::Linker::DestroySource, |