diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-07-08 18:01:40 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-07-08 18:01:40 +0000 |
commit | 6dd2730024c20647b92ddfbb80e9a8bf33308ccd (patch) | |
tree | 6d7239be72ffeee5d4fe009beeaf7705e138356a /llvm/lib/Target/ARM/ARMJITInfo.cpp | |
parent | b841376098288c4f0788c977c7071a908cc4691e (diff) | |
download | bcm5719-llvm-6dd2730024c20647b92ddfbb80e9a8bf33308ccd.tar.gz bcm5719-llvm-6dd2730024c20647b92ddfbb80e9a8bf33308ccd.zip |
Start converting to new error handling API.
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)
llvm-svn: 75018
Diffstat (limited to 'llvm/lib/Target/ARM/ARMJITInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMJITInfo.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/ARM/ARMJITInfo.cpp b/llvm/lib/Target/ARM/ARMJITInfo.cpp index e551c41936f..bc28919817c 100644 --- a/llvm/lib/Target/ARM/ARMJITInfo.cpp +++ b/llvm/lib/Target/ARM/ARMJITInfo.cpp @@ -21,13 +21,14 @@ #include "llvm/CodeGen/JITCodeEmitter.h" #include "llvm/Config/alloca.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Streams.h" #include "llvm/System/Memory.h" #include <cstdlib> using namespace llvm; void ARMJITInfo::replaceMachineCodeForFunction(void *Old, void *New) { - abort(); + llvm_report_error("ARMJITInfo::replaceMachineCodeForFunction"); } /// JITCompilerFunction - This contains the address of the JIT function used to @@ -103,8 +104,7 @@ extern "C" { ); #else // Not an ARM host void ARMCompilationCallback() { - assert(0 && "Cannot call ARMCompilationCallback() on a non-ARM arch!\n"); - abort(); + LLVM_UNREACHABLE("Cannot call ARMCompilationCallback() on a non-ARM arch!\n"); } #endif } @@ -123,14 +123,12 @@ extern "C" void ARMCompilationCallbackC(intptr_t StubAddr) { // ldr pc, [pc,#-4] // <addr> if (!sys::Memory::setRangeWritable((void*)StubAddr, 8)) { - cerr << "ERROR: Unable to mark stub writable\n"; - abort(); + llvm_report_error("ERROR: Unable to mark stub writable"); } *(intptr_t *)StubAddr = 0xe51ff004; // ldr pc, [pc, #-4] *(intptr_t *)(StubAddr+4) = NewVal; if (!sys::Memory::setRangeExecutable((void*)StubAddr, 8)) { - cerr << "ERROR: Unable to mark stub executable\n"; - abort(); + llvm_report_error("ERROR: Unable to mark stub executable"); } } |