From 8fe85c7742d91322682f2c415c9450b47d43a5ac Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Mon, 4 Aug 2014 18:50:02 -0400 Subject: [PATCH] gallivm: Fix build with latest LLVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Vesely Reviewed-and-Tested-by: Michel Dänzer (cherry picked from commit e28136343b6aa7dfff8ec85f6463574d6625b5a6) Nominated-by: Marek Olšák Conflicts: src/gallium/auxiliary/gallivm/lp_bld_debug.cpp --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 7e43b514b66..2629aaa66d6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -34,6 +34,10 @@ #include #include +#if HAVE_LLVM >= 0x0306 +#include +#endif + #if HAVE_LLVM >= 0x0300 #include #include @@ -302,7 +306,11 @@ disassemble(const void* func, llvm::raw_ostream & Out) OwningPtr TM(T->createTargetMachine(Triple, "")); #endif +#if HAVE_LLVM >= 0x0306 + const TargetInstrInfo *TII = TM->getSubtargetImpl()->getInstrInfo(); +#else const TargetInstrInfo *TII = TM->getInstrInfo(); +#endif /* * Wrap the data in a MemoryObject