No longer run atExit functions from run()

rename run to runFunction
Genericize the runFunction code a little bit, though it still stinks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-12-26 06:13:47 +00:00
parent 2cab55d7e1
commit ff0f1bb32a
3 changed files with 26 additions and 22 deletions

View File

@@ -28,7 +28,7 @@ static std::vector<void (*)()> AtExitHandlers;
/// calls to atexit(3), which we intercept and store in
/// AtExitHandlers.
///
void JIT::runAtExitHandlers() {
static void runAtExitHandlers() {
while (!AtExitHandlers.empty()) {
void (*Fn)() = AtExitHandlers.back();
AtExitHandlers.pop_back();
@@ -45,7 +45,7 @@ static void NoopFn() {}
// jit_exit - Used to intercept the "exit" library call.
static void jit_exit(int Status) {
JIT::runAtExitHandlers(); // Run atexit handlers...
runAtExitHandlers(); // Run atexit handlers...
exit(Status);
}