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
This commit is contained in:
Brian Gaeke 2004-02-13 05:48:00 +00:00
parent a0031cc08c
commit d8400d86dd

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