|
|
@@ -207,21 +207,13 @@ lp_disassemble(const void* func) |
|
|
|
} |
|
|
|
|
|
|
|
raw_debug_ostream Out; |
|
|
|
#if HAVE_LLVM >= 0x0300 |
|
|
|
TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), ""); |
|
|
|
#else |
|
|
|
TargetMachine *TM = T->createTargetMachine(Triple, ""); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAVE_LLVM >= 0x0300 |
|
|
|
unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); |
|
|
|
#else |
|
|
|
int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); |
|
|
|
#endif |
|
|
|
#if HAVE_LLVM >= 0x0300 |
|
|
|
OwningPtr<MCInstPrinter> Printer( |
|
|
|
T->createMCInstPrinter(*TM, AsmPrinterVariant, *AsmInfo)); |
|
|
|
#elif HAVE_LLVM >= 0x0208 |
|
|
|
#if HAVE_LLVM >= 0x0208 |
|
|
|
OwningPtr<MCInstPrinter> Printer( |
|
|
|
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo)); |
|
|
|
#else |
|
|
@@ -233,6 +225,12 @@ lp_disassemble(const void* func) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
#if HAVE_LLVM >= 0x0300 |
|
|
|
TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), ""); |
|
|
|
#else |
|
|
|
TargetMachine *TM = T->createTargetMachine(Triple, ""); |
|
|
|
#endif |
|
|
|
|
|
|
|
const TargetInstrInfo *TII = TM->getInstrInfo(); |
|
|
|
|
|
|
|
/* |