Revert "Make ExecutionEngine owning a DataLayout"

Reverting to fix buildbot breakage.

This reverts commit r242387.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Kuperstein
2015-07-16 12:20:31 +00:00
parent 81266fc854
commit 4fceffb0d6
9 changed files with 55 additions and 61 deletions

View File

@@ -49,15 +49,16 @@ ExecutionEngine *Interpreter::create(std::unique_ptr<Module> M,
// Interpreter ctor - Initialize stuff
//
Interpreter::Interpreter(std::unique_ptr<Module> M)
: ExecutionEngine(M->getDataLayout(), std::move(M)) {
: ExecutionEngine(std::move(M)), TD(Modules.back().get()) {
memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
setDataLayout(&TD);
// Initialize the "backend"
initializeExecutionEngine();
initializeExternalFunctions();
emitGlobals();
IL = new IntrinsicLowering(getDataLayout());
IL = new IntrinsicLowering(TD);
}
Interpreter::~Interpreter() {