aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JIT.cpp
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-07 17:32:34 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-07 17:32:34 +0000
commit31e2466f159a887fed9139067a676f65adf2a8c3 (patch)
tree038fcdc29c6f146048427213045ae05a3e4fe0b8 /lib/ExecutionEngine/JIT/JIT.cpp
parent9903527c142a37a25ea3b2212cb04a182331fbfa (diff)
Introduce new error handling API.
This will replace exit()/abort() style error handling with an API that allows clients to register custom error handling hooks. The default is to call exit(1) when no error handler is provided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 1d8312f762..785b5b9284 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -27,6 +27,7 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetJITInfo.h"
#include "llvm/Support/Dwarf.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MutexGuard.h"
#include "llvm/System/DynamicLibrary.h"
#include "llvm/Config/config.h"
@@ -671,9 +672,8 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
#endif
Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName().c_str());
if (Ptr == 0 && !areDlsymStubsEnabled()) {
- cerr << "Could not resolve external global address: "
- << GV->getName() << "\n";
- abort();
+ llvm_report_error("Could not resolve external global address: "
+ +GV->getName());
}
addGlobalMapping(GV, Ptr);
} else {