The Interpreter was failing the AtExit UnitTest. This fixes it.

llvm-svn: 11367
This commit is contained in:
Brian Gaeke 2004-02-13 05:48:00 +00:00
parent 50719e9dbc
commit 212ffba663

View File

@ -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);
}