Mesa (7.11): gallivm: Fix build with llvm-3.0
Brian Paul
brianp at kemper.freedesktop.org
Fri Jul 8 14:04:18 UTC 2011
Module: Mesa
Branch: 7.11
Commit: 8428b48673a8ab5e7d4e7bfdb1089f28879fbe8b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8428b48673a8ab5e7d4e7bfdb1089f28879fbe8b
Author: Brian Paul <brianp at vmware.com>
Date: Fri Jul 8 08:03:40 2011 -0600
gallivm: Fix build with llvm-3.0
LLVM 3.0svn changes pretty rapidly. The change in
Target->createMCInstPrinter() signature which inspired commits
40ae214067673edbda79371969d1730b6194d83e and
92e29dc5b0474c073b0f05d60629fc6c3decfca4 has been reverted.
Signed-off-by: Gustaw Smolarczyk <wielkiegie at gmail.com>
Signed-off-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit fc98444bd58960e6cab28423365923bc7e7af3e1)
Conflicts:
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
---
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 0b724a3..8636cd6 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -207,17 +207,13 @@ lp_disassemble(const void* func)
}
raw_debug_ostream Out;
- TargetMachine *TM = T->createTargetMachine(Triple, "");
#if HAVE_LLVM >= 0x0300
unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
#else
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
#endif
-#if HAVE_LLVM >= 0x0300
- OwningPtr<MCInstPrinter> Printer(
- T->createMCInstPrinter(*TM, AsmPrinterVariant, *AsmInfo));
-#elif HAVE_LLVM >= 0x0208
+#if HAVE_LLVM >= 0x0208
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
#else
@@ -229,6 +225,12 @@ lp_disassemble(const void* func)
return;
}
+#if HAVE_LLVM >= 0x0300
+ TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), "");
+#else
+ TargetMachine *TM = T->createTargetMachine(Triple, "");
+#endif
+
const TargetInstrInfo *TII = TM->getInstrInfo();
/*
More information about the mesa-commit
mailing list