summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2012-04-02 22:14:15 -0700
committerVinson Lee <vlee@freedesktop.org>2012-04-03 10:55:45 -0700
commit4f513002f65c629576252b34efedf3c8c4531dfd (patch)
tree7f17ab51bbd970ce78503a76dcbfad3b16c39097 /src/gallium
parent24ca588ce66233a92e95dc70deb983c97dc24e55 (diff)
downloadexternal_mesa3d-4f513002f65c629576252b34efedf3c8c4531dfd.zip
external_mesa3d-4f513002f65c629576252b34efedf3c8c4531dfd.tar.gz
external_mesa3d-4f513002f65c629576252b34efedf3c8c4531dfd.tar.bz2
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 <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_debug.cpp8
1 files changed, 7 insertions, 1 deletions
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));