aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter/UserInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/UserInput.cpp')
-rw-r--r--lib/ExecutionEngine/Interpreter/UserInput.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/Interpreter/UserInput.cpp b/lib/ExecutionEngine/Interpreter/UserInput.cpp
index 49fd5e4bc1..a1518d413e 100644
--- a/lib/ExecutionEngine/Interpreter/UserInput.cpp
+++ b/lib/ExecutionEngine/Interpreter/UserInput.cpp
@@ -153,6 +153,7 @@ void Interpreter::loadModule(const string &Filename) {
<< ErrorMsg << "\n";
return;
}
+ CW.setModule(CurMod); // Update Writer
string RuntimeLib = getCurrentExecutablePath();
if (!RuntimeLib.empty()) RuntimeLib += "/";
@@ -185,6 +186,7 @@ bool Interpreter::flushModule() {
CurFrame = -1;
}
+ CW.setModule(0);
delete CurMod;
CurMod = 0;
ExitCode = 0;