Lines 54-59
Link Here
|
54 |
#include <llvm/MC/MCInstPrinter.h> |
54 |
#include <llvm/MC/MCInstPrinter.h> |
55 |
#endif /* HAVE_LLVM >= 0x0207 */ |
55 |
#endif /* HAVE_LLVM >= 0x0207 */ |
56 |
|
56 |
|
|
|
57 |
#if HAVE_LLVM >= 0x0301 |
58 |
#include <llvm/MC/MCRegisterInfo.h> |
59 |
#endif /* HAVE_LLVM >= 0x0301 */ |
60 |
|
57 |
#include "util/u_math.h" |
61 |
#include "util/u_math.h" |
58 |
#include "util/u_debug.h" |
62 |
#include "util/u_debug.h" |
59 |
|
63 |
|
Lines 235-241
lp_disassemble(const void* func)
Link Here
|
235 |
int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); |
239 |
int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); |
236 |
#endif |
240 |
#endif |
237 |
|
241 |
|
238 |
#if HAVE_LLVM >= 0x0300 |
242 |
#if HAVE_LLVM >= 0x0301 |
|
|
243 |
OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple)); |
244 |
if (!MRI) { |
245 |
debug_printf("error: no register info for target %s\n", Triple.c_str()); |
246 |
return; |
247 |
} |
248 |
OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo()); |
249 |
if (!MII) { |
250 |
debug_printf("error: no instruction info for target %s\n", Triple.c_str()); |
251 |
return; |
252 |
} |
253 |
#endif |
254 |
|
255 |
#if HAVE_LLVM >= 0x0301 |
256 |
OwningPtr<MCInstPrinter> Printer( |
257 |
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI)); |
258 |
#elif HAVE_LLVM >= 0x0300 |
239 |
OwningPtr<MCInstPrinter> Printer( |
259 |
OwningPtr<MCInstPrinter> Printer( |
240 |
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI)); |
260 |
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI)); |
241 |
#elif HAVE_LLVM >= 0x0208 |
261 |
#elif HAVE_LLVM >= 0x0208 |