summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/llvm
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-02-25 13:32:37 -0800
committerTom Stellard <[email protected]>2014-02-25 13:32:37 -0800
commitfcd499730b225ec5a35902893c059086ba11b590 (patch)
tree2efa4c4c5f444a4608d621b2ecaef1f1a421fdff /src/gallium/state_trackers/clover/llvm
parentd9b983519c63b9072677364a6e399d213a1855e5 (diff)
clover: Fix build with LLVM 3.5
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm')
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index e8266693bd0..cdf32b6e3fb 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -297,8 +297,10 @@ namespace {
llvm::Argument &arg = *I;
#if HAVE_LLVM < 0x0302
llvm::TargetData TD(kernel_func->getParent());
-#else
+#elif HAVE_LLVM < 0x0304
llvm::DataLayout TD(kernel_func->getParent()->getDataLayout());
+#else
+ llvm::DataLayout TD(mod);
#endif
llvm::Type *arg_type = arg.getType();