From: Vinson Lee Date: Tue, 3 Apr 2012 05:14:15 +0000 (-0700) Subject: gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f513002f65c629576252b34efedf3c8c4531dfd;p=mesa.git gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1. llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index c5afff09ae6..9cf20943339 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -251,11 +251,17 @@ lp_disassemble(const void* func) debug_printf("error: no register info for target %s\n", Triple.c_str()); return; } + + OwningPtr MII(T->createMCInstrInfo()); + if (!MII) { + debug_printf("error: no instruction info for target %s\n", Triple.c_str()); + return; + } #endif #if HAVE_LLVM >= 0x0301 OwningPtr Printer( - T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI)); + T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI)); #elif HAVE_LLVM == 0x0300 OwningPtr Printer( T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));