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
diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp
index 5d256f9..0b1b976 100644
--- a/lib/ExecutionEngine/JIT/Intercept.cpp
+++ b/lib/ExecutionEngine/JIT/Intercept.cpp
@@ -28,7 +28,7 @@
/// 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 @@
// 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);
}