diff options
author | Chris Lattner <sabre@nondot.org> | 2003-05-14 13:27:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-05-14 13:27:36 +0000 |
commit | 1b72216a711cddf5fc53cf0a4f5407b41b8303c9 (patch) | |
tree | c38e94fec68e49befd625c44cb063a4855ee9041 /lib/ExecutionEngine/JIT/Intercept.cpp | |
parent | 6701a8603f7531618287d3d254055c5571dca0d3 (diff) |
Fix compilation problems with previous checking *blush*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/Intercept.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/Intercept.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp index 4314fb6b10..448ff2d356 100644 --- a/lib/ExecutionEngine/JIT/Intercept.cpp +++ b/lib/ExecutionEngine/JIT/Intercept.cpp @@ -10,6 +10,7 @@ #include "VM.h" #include <dlfcn.h> // dlsym access +#include <iostream> //===----------------------------------------------------------------------===// // Function stubs that are invoked instead of raw system calls @@ -25,7 +26,7 @@ static void jit_exit(int Status) { // jit_atexit - Used to intercept the "at_exit" system call. static int jit_atexit(void (*Fn)(void)) { - atexit(Fn); // Do nothing for now. + return atexit(Fn); // Do nothing for now. } //===----------------------------------------------------------------------===// @@ -36,8 +37,8 @@ static int jit_atexit(void (*Fn)(void)) { /// void *VM::getPointerToNamedFunction(const std::string &Name) { // Check to see if this is one of the functions we want to intercept... - if (Name == "exit") return jit_exit; - if (Name == "at_exit") return jit_atexit; + if (Name == "exit") return (void*)&jit_exit; + if (Name == "at_exit") return (void*)&jit_atexit; // If it's an external function, look it up in the process image... void *Ptr = dlsym(0, Name.c_str()); |