diff options
| author | Brian Gaeke <gaeke@uiuc.edu> | 2004-02-13 05:48:00 +0000 | 
|---|---|---|
| committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-02-13 05:48:00 +0000 | 
| commit | d8400d86dd016ae93b25465dcf3bd5513800293a (patch) | |
| tree | 51e1c1177f443079927a93f97539bd35c53a98f4 /lib/ExecutionEngine/Interpreter/Execution.cpp | |
| parent | a0031cc08c73717341e53c9d5c6c9daa4fcdf5f7 (diff) | |
The Interpreter was failing the AtExit UnitTest. This fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp')
| -rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 57ae621545..5379c04fbf 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -523,6 +523,10 @@ void Interpreter::visitBinaryOperator(BinaryOperator &I) {  //===----------------------------------------------------------------------===//  void Interpreter::exitCalled(GenericValue GV) { +  // runAtExitHandlers() assumes there are no stack frames, but +  // if exit() was called, then it had a stack frame. Blow away +  // the stack before interpreting atexit handlers. +  ECStack.clear ();    runAtExitHandlers ();    exit (GV.IntVal);  }  | 
