* Use cached writer to speed up printing and get symbolic types more consistently
* When a segfault or bus error occurs, stop the program, print a stack trace, and dump the user in the debugger mode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1169 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/Interpreter/UserInput.cpp b/lib/ExecutionEngine/Interpreter/UserInput.cpp
index 49fd5e4..a1518d4 100644
--- a/lib/ExecutionEngine/Interpreter/UserInput.cpp
+++ b/lib/ExecutionEngine/Interpreter/UserInput.cpp
@@ -153,6 +153,7 @@
          << ErrorMsg << "\n";
     return;
   }
+  CW.setModule(CurMod);  // Update Writer
 
   string RuntimeLib = getCurrentExecutablePath();
   if (!RuntimeLib.empty()) RuntimeLib += "/";
@@ -185,6 +186,7 @@
     CurFrame = -1;
   }
 
+  CW.setModule(0);
   delete CurMod;
   CurMod = 0;
   ExitCode = 0;