summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-02-07 05:05:23 +0000
committerCraig Topper <craig.topper@gmail.com>2012-02-07 05:05:23 +0000
commita2886c21d9a08d63c324cc61aa91ae0893507a31 (patch)
tree26343892cf0ad93e83448d53dc0448e7ad413412 /llvm/lib/ExecutionEngine/RuntimeDyld
parenta767941651945183cc3665173fd850a6b057c018 (diff)
downloadbcm5719-llvm-a2886c21d9a08d63c324cc61aa91ae0893507a31.tar.gz
bcm5719-llvm-a2886c21d9a08d63c324cc61aa91ae0893507a31.zip
Convert assert(0) to llvm_unreachable
llvm-svn: 149967
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp11
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp2
2 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index c0845fbbb20..e15b200c5e0 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -185,9 +185,7 @@ void RuntimeDyldELF::resolveX86_64Relocation(StringRef Name,
}
switch (RE.Type) {
- default:
- assert(0 && ("Relocation type not implemented yet!"));
- break;
+ default: llvm_unreachable("Relocation type not implemented yet!");
case ELF::R_X86_64_64: {
uint8_t **Target = reinterpret_cast<uint8_t**>(TargetAddr);
*Target = Addr + RE.Addend;
@@ -249,8 +247,7 @@ void RuntimeDyldELF::resolveX86Relocation(StringRef Name,
default:
// There are other relocation types, but it appears these are the
// only ones currently used by the LLVM ELF object writer
- assert(0 && ("Relocation type not implemented yet!"));
- break;
+ llvm_unreachable("Relocation type not implemented yet!");
}
}
@@ -272,9 +269,7 @@ void RuntimeDyldELF::resolveRelocation(StringRef Name,
case Triple::arm:
resolveArmRelocation(Name, Addr, RE);
break;
- default:
- assert(0 && "Unsupported CPU type!");
- break;
+ default: llvm_unreachable("Unsupported CPU type!");
}
}
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 669ff4c6f8e..4be91d347bb 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -26,7 +26,7 @@ resolveRelocation(uint8_t *Address, uint64_t Value, bool isPCRel,
unsigned Type, unsigned Size, int64_t Addend) {
// This just dispatches to the proper target specific routine.
switch (CPUType) {
- default: assert(0 && "Unsupported CPU type!");
+ default: llvm_unreachable("Unsupported CPU type!");
case mach::CTM_x86_64:
return resolveX86_64Relocation((uintptr_t)Address, (uintptr_t)Value,
isPCRel, Type, Size, Addend);
OpenPOWER on IntegriCloud