gallivm: Fix build against LLVM 3.7 SVN r233648
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 31 Mar 2015 06:05:01 +0000 (15:05 +0900)
committerMichel Dänzer <michel@daenzer.net>
Tue, 31 Mar 2015 06:05:01 +0000 (15:05 +0900)
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index d4d453d26157961d317598ac675e868a24142e61..65d289689f82a243159099e1df173ab274b123da 100644 (file)
@@ -256,8 +256,13 @@ disassemble(const void* func, llvm::raw_ostream & Out)
    }
 
 
+#if HAVE_LLVM >= 0x0307
+   OwningPtr<MCInstPrinter> Printer(
+         T->createMCInstPrinter(llvm::Triple(Triple), AsmPrinterVariant, *AsmInfo, *MII, *MRI));
+#else
    OwningPtr<MCInstPrinter> Printer(
          T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
+#endif
    if (!Printer) {
       Out << "error: no instruction printer for target " << Triple.c_str() << "\n";
       Out.flush();