From 40ae214067673edbda79371969d1730b6194d83e Mon Sep 17 00:00:00 2001 From: Tobias Droste Date: Sun, 27 Mar 2011 08:11:14 -0700 Subject: [PATCH] gallivm: Fix build with llvm-2.9 In llvm-2.9 Target->createMCInstPrinter() takes different arguments Signed-off-by: Tobias Droste --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 12 +++++++++--- 1 file 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 1f24cb6f572..76d63ced2de 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 Printer( + T->createMCInstPrinter(*TM, AsmPrinterVariant, *AsmInfo)); +#elif HAVE_LLVM >= 0x0208 OwningPtr 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(); /* -- 2.30.2