clover: Fix build with LLVM 3.5
authorTom Stellard <thomas.stellard@amd.com>
Tue, 25 Feb 2014 21:32:37 +0000 (13:32 -0800)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 25 Feb 2014 21:32:37 +0000 (13:32 -0800)
src/gallium/state_trackers/clover/llvm/invocation.cpp

index e8266693bd0172c3cac4da44e24947d68012925d..cdf32b6e3fbaa4487a5ee2009ca8a3bd1bc5ce52 100644 (file)
@@ -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();