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 | 51f100753cc87ae7f57705a18837bb08839cf701 (patch) | |
tree | eb42968db64268e969c7b56c68e7ec78e3fc882f /llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | |
parent | 5feee4b2517fc42d500ddf9381352d503dc901ad (diff) | |
download | bcm5719-llvm-51f100753cc87ae7f57705a18837bb08839cf701.tar.gz bcm5719-llvm-51f100753cc87ae7f57705a18837bb08839cf701.zip |
The Interpreter was failing the AtExit UnitTest. This fixes it.
llvm-svn: 11367
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index 57ae6215456..5379c04fbf6 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/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); } |