diff options
author | Vinson Lee <vlee@freedesktop.org> | 2012-03-05 22:00:40 -0800 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2012-03-06 10:31:12 -0800 |
commit | 1633dcd890d97bd5e4d125d57f2f529f04d14477 (patch) | |
tree | 66d4a10fbad26f7b63d0106f486a2ca87f096fa2 /src/gallium/auxiliary | |
parent | ef3e26c2e43a000d5e5e6b673324b0ebdc918207 (diff) | |
download | external_mesa3d-1633dcd890d97bd5e4d125d57f2f529f04d14477.zip external_mesa3d-1633dcd890d97bd5e4d125d57f2f529f04d14477.tar.gz external_mesa3d-1633dcd890d97bd5e4d125d57f2f529f04d14477.tar.bz2 |
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 <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 11209da..b6849cb 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<const MCRegisterInfo> 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<MCInstPrinter> Printer( + T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI)); +#elif HAVE_LLVM == 0x0300 OwningPtr<MCInstPrinter> Printer( T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI)); #elif HAVE_LLVM >= 0x0208 |