draw: hack around weird primitive id input in gs
[mesa.git] / 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