summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
index 14ce74fcc14..f103c09659a 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
@@ -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() {
OpenPOWER on IntegriCloud