clover: Fix build against LLVM 3.8 SVN >= r255078
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 9 Dec 2015 06:46:46 +0000 (15:46 +0900)
committerMichel Dänzer <michel@daenzer.net>
Thu, 10 Dec 2015 01:45:29 +0000 (10:45 +0900)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index 3b37f0802b042f65b977d5a177e9126e58381c8e..4d11c2477c720991c994da8cf21c7c5c75c1a0a0 100644 (file)
@@ -661,7 +661,11 @@ namespace {
 
       if (dump_asm) {
          LLVMSetTargetMachineAsmVerbosity(tm, true);
+#if HAVE_LLVM >= 0x0308
+         LLVMModuleRef debug_mod = wrap(llvm::CloneModule(mod).release());
+#else
          LLVMModuleRef debug_mod = wrap(llvm::CloneModule(mod));
+#endif
          emit_code(tm, debug_mod, LLVMAssemblyFile, &out_buffer, r_log);
          buffer_size = LLVMGetBufferSize(out_buffer);
          buffer_data = LLVMGetBufferStart(out_buffer);