summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2018-01-02 10:48:21 -0600
committerTim Rowley <[email protected]>2018-01-03 11:42:00 -0600
commitad218754c79e0af61d5ba225a4b195cb55c2cac9 (patch)
tree400d8cf97041bcc58aa9957b5edc31c6f6f29d6e /src/gallium
parent28234c5bf843229f1642964e22f2138b5f5d83d7 (diff)
swr/rast: fix MemoryBuffer build break for llvm-6
LLVM api change. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104381 Tested-by: Laurent Carlier <[email protected]> Reviewed-By: Bruce Cherniak <[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 3f0772c942c..59672bb5458 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -498,7 +498,11 @@ std::unique_ptr<llvm::MemoryBuffer> JitCache::getObject(const llvm::Module* M)
break;
}
+#if LLVM_VERSION_MAJOR < 6
pBuf = llvm::MemoryBuffer::getNewUninitMemBuffer(size_t(header.GetBufferSize()));
+#else
+ pBuf = llvm::WritableMemoryBuffer::getNewUninitMemBuffer(size_t(header.GetBufferSize()));
+#endif
if (!fread(const_cast<char*>(pBuf->getBufferStart()), header.GetBufferSize(), 1, fpIn))
{
pBuf = nullptr;