swr: [rasterizer jitter] fix llvm-3.7 compile
authorTim Rowley <timothy.o.rowley@intel.com>
Wed, 6 Jul 2016 21:26:16 +0000 (16:26 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Tue, 12 Jul 2016 15:42:57 +0000 (10:42 -0500)
d3d97f8 broke llvm-3.7, which has a mismatched API for
setDataLayout/getDataLayout.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp

index 6e00a70c8875580d4424786d6895e1bec7773d66..c6cbccf094ae972461844a823277d7dd2cf610ff 100644 (file)
@@ -241,7 +241,12 @@ bool JitManager::SetupModuleFromIR(const uint8_t *pIR)
         return false;
     }
 
+#if HAVE_LLVM == 0x307
+    // llvm-3.7 has mismatched setDataLyout/getDataLayout APIs
+    newModule->setDataLayout(*mpExec->getDataLayout());
+#else
     newModule->setDataLayout(mpExec->getDataLayout());
+#endif
 
     mpCurrentModule = newModule.get();
 #if defined(_WIN32)