#include <llvm/Target/TargetInstrInfo.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Support/MemoryObject.h>
+
+#if HAVE_LLVM >= 0x0209
+#include <llvm/Support/Host.h>
+#else
#include <llvm/System/Host.h>
+#endif
#if HAVE_LLVM >= 0x0207
#include <llvm/MC/MCDisassembler.h>
raw_debug_ostream Out;
+#if HAVE_LLVM >= 0x0300
+ unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
+#else
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
+#endif
#if HAVE_LLVM >= 0x0208
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
return;
}
+#if HAVE_LLVM >= 0x0300
+ TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), "");
+#else
TargetMachine *TM = T->createTargetMachine(Triple, "");
+#endif
const TargetInstrInfo *TII = TM->getInstrInfo();
pc += Size;
+#if HAVE_LLVM >= 0x0300
+ const MCInstrDesc &TID = TII->get(Inst.getOpcode());
+#else
const TargetInstrDesc &TID = TII->get(Inst.getOpcode());
+#endif
/*
* Keep track of forward jumps to a nearby address.