From eae9da879f3143507ef0e238a7e4faa87114d54e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Thu, 28 Aug 2014 12:05:21 +0900 Subject: [PATCH] st/clover: Fix build against LLVM SVN >= r216583 Reviewed-by: Francisco Jerez --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.30.2