gallivm: Use MCInstrInfo in the disassembler for querying instruction info
authorTom Stellard <thomas.stellard@amd.com>
Mon, 23 Mar 2015 14:37:24 +0000 (14:37 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 23 Mar 2015 14:43:10 +0000 (14:43 +0000)
This fixes the build since llvm r232885 and also simplifies the code.

src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index 2c4ed21edd42f3a9314bfcad9f9b946a543350df..bf6268b3360e9bfb5f2b7a7d7cf580494f0d7b09 100644 (file)
@@ -276,12 +276,6 @@ 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
     */
@@ -336,7 +330,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
 
       pc += Size;
 
-      const MCInstrDesc &TID = TII->get(Inst.getOpcode());
+      const MCInstrDesc &TID = MII->get(Inst.getOpcode());
 
       /*
        * Keep track of forward jumps to a nearby address.