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 | c67e34032753a4fe9e943ab56fd88fd507928055 (patch) | |
tree | f532d6440eff8604085bad829ecce48caf92e8f3 /llvm/lib/ExecutionEngine/JIT/Intercept.cpp | |
parent | 5a9ea75e6ba977627ef0e5296a2d9dbaab49cd86 (diff) | |
download | bcm5719-llvm-c67e34032753a4fe9e943ab56fd88fd507928055.tar.gz bcm5719-llvm-c67e34032753a4fe9e943ab56fd88fd507928055.zip |
Fix compilation problems with previous checking *blush*
llvm-svn: 6191
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/Intercept.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/Intercept.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/Intercept.cpp b/llvm/lib/ExecutionEngine/JIT/Intercept.cpp index 4314fb6b10b..448ff2d3563 100644 --- a/llvm/lib/ExecutionEngine/JIT/Intercept.cpp +++ b/llvm/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()); |