mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user