diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-07-07 17:32:34 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-07-07 17:32:34 +0000 |
commit | 6c2d233e7a8993d90fd97703ed8331f2d6e80671 (patch) | |
tree | 9388c1d2e60e622e5da14da32087af46ff8b8e4d /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 9e2af02143283d140d52ab9fe7d46cd21998829a (diff) | |
download | bcm5719-llvm-6c2d233e7a8993d90fd97703ed8331f2d6e80671.tar.gz bcm5719-llvm-6c2d233e7a8993d90fd97703ed8331f2d6e80671.zip |
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.
llvm-svn: 74922
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index a80513f3df9..69518b65849 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -22,6 +22,7 @@ #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MutexGuard.h" #include "llvm/System/DynamicLibrary.h" #include "llvm/System/Host.h" @@ -640,7 +641,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { case Type::FP128TyID: { APFloat apfLHS = APFloat(LHS.IntVal); switch (CE->getOpcode()) { - default: assert(0 && "Invalid long double opcode"); abort(); + default: assert(0 && "Invalid long double opcode");llvm_unreachable(); case Instruction::FAdd: apfLHS.add(APFloat(RHS.IntVal), APFloat::rmNearestTiesToEven); GV.IntVal = apfLHS.bitcastToAPInt(); @@ -953,9 +954,8 @@ void ExecutionEngine::emitGlobals() { sys::DynamicLibrary::SearchForAddressOfSymbol(I->getName().c_str())) addGlobalMapping(I, SymAddr); else { - cerr << "Could not resolve external global address: " - << I->getName() << "\n"; - abort(); + llvm_report_error("Could not resolve external global address: " + +I->getName()); } } } |