gallivm: Fix build for LLVM < 3.3
authorTom Stellard <thomas.stellard@amd.com>
Mon, 6 May 2013 16:58:56 +0000 (09:58 -0700)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 6 May 2013 18:17:03 +0000 (11:17 -0700)
The C API versions of the LLVM multithreaded functions were added in
LLVM 3.3.

src/gallium/auxiliary/gallivm/lp_bld_misc.cpp

index 897f7ffb276ebc76beb3ea38ed22160cbb21e97d..1e5adb782b8546337894ef56dc34abb3feb097bd 100644 (file)
@@ -85,9 +85,15 @@ class LLVMEnsureMultithreaded {
 public:
    LLVMEnsureMultithreaded()
    {
+#if HAVE_LLVM < 0x0303
+      if (!llvm::llvm_is_multithreaded()) {
+         llvm::llvm_start_multithreaded();
+      }
+#else
       if (!LLVMIsMultithreaded()) {
          LLVMStartMultithreaded();
       }
+#endif
    }
 };