return static_cast<char*>(RawMemory) + sizeof(GVMemoryBlock);
}
- virtual void deleted() {
+ void deleted() override {
// We allocated with operator new and with some extra memory hanging off the
// end, so don't just delete this. I'm not sure if this is actually
// required.
}
ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
- OwningPtr<TargetMachine> TheTM(TM); // Take ownership.
+ std::unique_ptr<TargetMachine> TheTM(TM); // Take ownership.
// Make sure we can resolve symbols in the program as well. The zero arg
// to the function tells DynamicLibrary to load the program, not a library.
if (UseMCJIT && ExecutionEngine::MCJITCtor) {
ExecutionEngine *EE =
ExecutionEngine::MCJITCtor(M, ErrorStr, MCJMM ? MCJMM : JMM,
- AllocateGVsWithCode, TheTM.take());
+ AllocateGVsWithCode, TheTM.release());
if (EE) return EE;
} else if (ExecutionEngine::JITCtor) {
ExecutionEngine *EE =
ExecutionEngine::JITCtor(M, ErrorStr, JMM,
- AllocateGVsWithCode, TheTM.take());
+ AllocateGVsWithCode, TheTM.release());
if (EE) return EE;
}
}