From: Vinson Lee Date: Tue, 6 Mar 2012 06:00:40 +0000 (-0800) Subject: gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1633dcd890d97bd5e4d125d57f2f529f04d14477;p=mesa.git gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1. llvm-3.1svn r152043 changes createMCInstPrinter to take an additional MCRegisterInfo argument. 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 11209da78ef..b6849cbdcab 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -243,7 +243,18 @@ lp_disassemble(const void* func) int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); #endif -#if HAVE_LLVM >= 0x0300 +#if HAVE_LLVM >= 0x0301 + OwningPtr MRI(T->createMCRegInfo(Triple)); + if (!MRI) { + debug_printf("error: no register info for target %s\n", Triple.c_str()); + return; + } +#endif + +#if HAVE_LLVM >= 0x0301 + OwningPtr Printer( + T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI)); +#elif HAVE_LLVM == 0x0300 OwningPtr Printer( T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI)); #elif HAVE_LLVM >= 0x0208