gallivm: Fix build with latest LLVM
authorJan Vesely <jan.vesely@rutgers.edu>
Mon, 4 Aug 2014 22:50:02 +0000 (18:50 -0400)
committerMichel Dänzer <michel.daenzer@amd.com>
Tue, 5 Aug 2014 03:52:56 +0000 (12:52 +0900)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index 413a0c2cd72e2ec7c64e156d636bffb3783b5c6c..b6b52c80efcab2fdb07c68116ff6d910bb9c16ca 100644 (file)
 #include <llvm/Support/Format.h>
 #include <llvm/Support/MemoryObject.h>
 
+#if HAVE_LLVM >= 0x0306
+#include <llvm/Target/TargetSubtargetInfo.h>
+#endif
+
 #include <llvm/Support/TargetRegistry.h>
 #include <llvm/MC/MCSubtargetInfo.h>
 
@@ -271,7 +275,11 @@ disassemble(const void* func, llvm::raw_ostream & Out)
 #endif
    OwningPtr<TargetMachine> TM(T->createTargetMachine(Triple, sys::getHostCPUName(), "", options));
 
+#if HAVE_LLVM >= 0x0306
+   const TargetInstrInfo *TII = TM->getSubtargetImpl()->getInstrInfo();
+#else
    const TargetInstrInfo *TII = TM->getInstrInfo();
+#endif
 
    /*
     * Wrap the data in a MemoryObject