#include "JIT.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/Streams.h"
#include "llvm/System/DynamicLibrary.h"
#include "llvm/Config/config.h"
using namespace llvm;
* linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat'
* available as an exported symbol, so we have to add it explicitly.
*/
+namespace {
class StatSymbols {
public:
StatSymbols() {
sys::DynamicLibrary::AddSymbol("mknod", (void*)(intptr_t)mknod);
}
};
+}
static StatSymbols initStatSymbols;
#endif // __linux__
}
// jit_atexit - Used to intercept the "atexit" library call.
-static int jit_atexit(void (*Fn)(void)) {
+static int jit_atexit(void (*Fn)()) {
AtExitHandlers.push_back(Fn); // Take note of atexit handler...
return 0; // Always successful
}
return RP;
if (AbortOnFailure) {
- llvm_report_error("ERROR: Program used external function '"+Name+
+ llvm_report_error("Program used external function '"+Name+
"' which could not be resolved!");
}
return 0;