mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
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:
parent
a0031cc08c
commit
d8400d86dd
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user