Mesa (7.11): gallivm: fix build with LLVM 3.0svn
Brian Paul
brianp at kemper.freedesktop.org
Mon Dec 5 16:02:59 UTC 2011
Module: Mesa
Branch: 7.11
Commit: 95a3724c698ac5deace2be084df945960fd7c80d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=95a3724c698ac5deace2be084df945960fd7c80d
Author: Tobias Droste <tdroste at gmx.de>
Date: Thu Sep 15 02:39:26 2011 +0200
gallivm: fix build with LLVM 3.0svn
LLVM 3.0svn added SubtargetInfo as additional parameter to
createMCDisassembler() and createMCInstPrinter().
See revision 139237 of LLVM.
Signed-off-by: Tobias Droste <tdroste at gmx.de>
Signed-off-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit 1795372feec77e62cbe150f5853e063b9e53acd2)
---
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 401e0e2..b9892d6 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -210,7 +210,12 @@ lp_disassemble(const void* func)
return;
}
+#if HAVE_LLVM >= 0x0300
+ const MCSubtargetInfo *STI = T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), "");
+ OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI));
+#else
OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler());
+#endif
if (!DisAsm) {
debug_printf("error: no disassembler for target %s\n", Triple.c_str());
return;
@@ -223,7 +228,11 @@ lp_disassemble(const void* func)
#else
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
#endif
-#if HAVE_LLVM >= 0x0208
+
+#if HAVE_LLVM >= 0x0300
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
+#elif HAVE_LLVM >= 0x0208
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
#else
More information about the mesa-commit
mailing list