From 4a5bb95729a5335bfdddd401454003ac05ba4316 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 May 2003 14:21:30 +0000 Subject: Add support for atexit function, remove support for __main function llvm-svn: 6194 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'llvm/lib/ExecutionEngine/Interpreter/Execution.cpp') diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index f03514dba2b..44c1e48c337 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -520,7 +520,9 @@ void Interpreter::visitBinaryOperator(BinaryOperator &I) { // Terminator Instruction Implementations //===----------------------------------------------------------------------===// -static void PerformExitStuff() { +// PerformExitStuff - Print out counters and profiling information if +// applicable... +void Interpreter::PerformExitStuff() { #ifdef PROFILE_STRUCTURE_FIELDS // Print out structure field accounting information... if (!FieldAccessCounts.empty()) { @@ -575,7 +577,6 @@ void Interpreter::exitCalled(GenericValue GV) { ExitCode = GV.SByteVal; ECStack.clear(); - PerformExitStuff(); } void Interpreter::visitReturnInst(ReturnInst &I) { @@ -609,8 +610,6 @@ void Interpreter::visitReturnInst(ReturnInst &I) { } else { ExitCode = 0; } - - PerformExitStuff(); return; } -- cgit v1.2.3