From 858143816d43e58b17bfd11cb1b57afbd7f0f893 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 7 Feb 2012 05:05:23 +0000 Subject: Convert assert(0) to llvm_unreachable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index c0845fbbb2..e15b200c5e 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/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(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!"); } } -- cgit v1.2.3