[Mesa-dev] [PATCH] gallivm: Fix build with llvm-2.9
Vinson Lee
vlee at vmware.com
Mon Mar 28 10:49:38 PDT 2011
Hi Tobias,
What revision of llvm are you using? I'm not seeing any build failures with llvm-2.9rc2. However, I am seeing build failures with llvm-3.0svn related to createMCInstPrinter.
Vinson
________________________________________
From: mesa-dev-bounces+vlee=vmware.com at lists.freedesktop.org [mesa-dev-bounces+vlee=vmware.com at lists.freedesktop.org] On Behalf Of Tobias Droste [tdroste at gmx.de]
Sent: Sunday, March 27, 2011 8:11 AM
To: mesa-dev at lists.freedesktop.org
Cc: Tobias Droste
Subject: [Mesa-dev] [PATCH] gallivm: Fix build with llvm-2.9
In llvm-2.9 Target->createMCInstPrinter() takes different arguments
Signed-off-by: Tobias Droste <tdroste at gmx.de>
---
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 1f24cb6..76d63ce 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -207,9 +207,17 @@ lp_disassemble(const void* func)
}
raw_debug_ostream Out;
+ TargetMachine *TM = T->createTargetMachine(Triple, "");
+#if HAVE_LLVM >= 0x0209
+ unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
+#else
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
-#if HAVE_LLVM >= 0x0208
+#endif
+#if HAVE_LLVM >= 0x0209
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(*TM, AsmPrinterVariant, *AsmInfo));
+#elif HAVE_LLVM >= 0x0208
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
#else
@@ -221,8 +229,6 @@ lp_disassemble(const void* func)
return;
}
- TargetMachine *TM = T->createTargetMachine(Triple, "");
-
const TargetInstrInfo *TII = TM->getInstrInfo();
/*
--
1.7.3.4
_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list