summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2018-04-30 23:57:23 -0700
committerVinson Lee <[email protected]>2018-05-03 14:06:09 -0700
commit589622a2fe1bbfb2564fae497e99a3bcb4a3e069 (patch)
tree52773ce6d514809e68412bf14071915e59e3abff /src/gallium
parent9a21c96126d6a13e7b472ec622c517c0d0285ba8 (diff)
swr/rast: Fix WriteBitcodeToFile usage with llvm-7.0.
Fix build error after llvm-7.0svn r325155 ("Pass a reference to a module to the bitcode writer."). CXX rasterizer/jitter/libmesaswr_la-JitManager.lo rasterizer/jitter/JitManager.cpp:548:30: error: reference to type 'const llvm::Module' could not bind to an lvalue of type 'const llvm::Module *' llvm::WriteBitcodeToFile(M, bitcodeStream); ^ Suggested-by: George Kyriazis <[email protected]> Signed-off-by: Vinson Lee <[email protected]> Reviewed-By: George Kyriazis <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index aadcca25550..efb747abdee 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -545,7 +545,11 @@ static inline uint32_t ComputeModuleCRC(const llvm::Module* M)
std::string bitcodeBuffer;
raw_string_ostream bitcodeStream(bitcodeBuffer);
+#if LLVM_VERSION_MAJOR >= 7
+ llvm::WriteBitcodeToFile(*M, bitcodeStream);
+#else
llvm::WriteBitcodeToFile(M, bitcodeStream);
+#endif
//M->print(bitcodeStream, nullptr, false);
bitcodeStream.flush();