#include "llvm/Support/MutexGuard.h"
#include "llvm/Target/TargetJITInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
sys::DynamicLibrary::LoadLibraryPermanently(nullptr, nullptr);
// If the target supports JIT code generation, create the JIT.
- if (TargetJITInfo *TJ = TM->getJITInfo()) {
+ if (TargetJITInfo *TJ = TM->getSubtargetImpl()->getJITInfo()) {
return new JIT(M, *TM, *TJ, JMM, GVsWithCode);
} else {
if (ErrorStr)
: ExecutionEngine(M), TM(tm), TJI(tji),
JMM(jmm ? jmm : JITMemoryManager::CreateDefaultMemManager()),
AllocateGVsWithCode(GVsWithCode), isAlreadyCodeGenerating(false) {
- setDataLayout(TM.getDataLayout());
+ setDataLayout(TM.getSubtargetImpl()->getDataLayout());
jitstate = new JITState(M);
// Add target data
MutexGuard locked(lock);
FunctionPassManager &PM = jitstate->getPM();
- M->setDataLayout(TM.getDataLayout());
+ M->setDataLayout(TM.getSubtargetImpl()->getDataLayout());
PM.add(new DataLayoutPass(M));
// Turn the machine code intermediate representation into bytes in memory that
jitstate = new JITState(M);
FunctionPassManager &PM = jitstate->getPM();
- M->setDataLayout(TM.getDataLayout());
+ M->setDataLayout(TM.getSubtargetImpl()->getDataLayout());
PM.add(new DataLayoutPass(M));
// Turn the machine code intermediate representation into bytes in memory
jitstate = new JITState(Modules[0]);
FunctionPassManager &PM = jitstate->getPM();
- M->setDataLayout(TM.getDataLayout());
+ M->setDataLayout(TM.getSubtargetImpl()->getDataLayout());
PM.add(new DataLayoutPass(M));
// Turn the machine code intermediate representation into bytes in memory