From: Michel Dänzer Date: Thu, 28 Aug 2014 03:05:21 +0000 (+0900) Subject: st/clover: Fix build against LLVM SVN >= r216583 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eae9da879f3143507ef0e238a7e4faa87114d54e;p=mesa.git st/clover: Fix build against LLVM SVN >= r216583 Reviewed-by: Francisco Jerez --- diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index d351bc5c3a2..7bca0d68357 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -211,8 +211,13 @@ namespace { &c.getDiagnosticOpts())); #endif +#if HAVE_LLVM >= 0x0306 + c.getPreprocessorOpts().addRemappedFile(name, + llvm::MemoryBuffer::getMemBuffer(source).release()); +#else c.getPreprocessorOpts().addRemappedFile(name, llvm::MemoryBuffer::getMemBuffer(source)); +#endif // Setting this attribute tells clang to link this file before // performing any optimizations. This is required so that