[Mesa-dev] [PATCH] gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.
Brian Paul
brianp at vmware.com
Tue Apr 3 07:00:04 PDT 2012
On 04/02/2012 11:26 PM, Vinson Lee wrote:
> llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
> src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
> index c5afff0..9cf2094 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<const MCInstrInfo> 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<MCInstPrinter> Printer(
> - T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
> + T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
> #elif HAVE_LLVM == 0x0300
> OwningPtr<MCInstPrinter> Printer(
> T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list