Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
#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>
#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