summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
diff options
context:
space:
mode:
authorTobias Droste <tdroste@gmx.de>2011-03-27 08:11:14 -0700
committerJosé Fonseca <jfonseca@vmware.com>2011-03-28 17:23:45 +0100
commit40ae214067673edbda79371969d1730b6194d83e (patch)
treec0821db9aca729647a0dc9404a0be0723c8c5b2a /src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
parent5d7c27f5ec2f30c264dc2d53c4980970b3a13ee5 (diff)
downloadexternal_mesa3d-40ae214067673edbda79371969d1730b6194d83e.zip
external_mesa3d-40ae214067673edbda79371969d1730b6194d83e.tar.gz
external_mesa3d-40ae214067673edbda79371969d1730b6194d83e.tar.bz2
gallivm: Fix build with llvm-2.9
In llvm-2.9 Target->createMCInstPrinter() takes different arguments Signed-off-by: Tobias Droste <tdroste@gmx.de>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_debug.cpp12
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();
/*