diff options
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 5 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 6 | ||||
-rw-r--r-- | lib/ExecutionEngine/MCJIT/MCJIT.cpp | 3 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 11 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 2 |
6 files changed, 12 insertions, 19 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index b9356dcd0a..2890174bc9 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -1149,6 +1149,6 @@ void ExecutionEngineState::AddressMapConfig::onDelete(ExecutionEngineState *EES, void ExecutionEngineState::AddressMapConfig::onRAUW(ExecutionEngineState *, const GlobalValue *, const GlobalValue *) { - assert(false && "The ExecutionEngine doesn't know how to handle a" - " RAUW on a value it has a global mapping for."); + llvm_unreachable("The ExecutionEngine doesn't know how to handle a" + " RAUW on a value it has a global mapping for."); } diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index eb2e19d392..f715f6f3a2 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -706,9 +706,8 @@ void *JIT::getPointerToBasicBlock(BasicBlock *BB) { if (I != getBasicBlockAddressMap(locked).end()) { return I->second; } else { - assert(0 && "JIT does not have BB address for address-of-label, was" - " it eliminated by optimizer?"); - return 0; + llvm_unreachable("JIT does not have BB address for address-of-label, was" + " it eliminated by optimizer?"); } } diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 26201c397d..504c8bdffd 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -76,8 +76,8 @@ namespace { struct NoRAUWValueMapConfig : public ValueMapConfig<ValueTy> { typedef JITResolverState *ExtraData; static void onRAUW(JITResolverState *, Value *Old, Value *New) { - assert(false && "The JIT doesn't know how to handle a" - " RAUW on a value it has emitted."); + llvm_unreachable("The JIT doesn't know how to handle a" + " RAUW on a value it has emitted."); } }; @@ -1162,7 +1162,7 @@ void JITEmitter::emitJumpTableInfo(MachineJumpTableInfo *MJTI) { break; } case MachineJumpTableInfo::EK_GPRel64BlockAddress: - assert(false && + llvm_unreachable( "JT Info emission not implemented for GPRel64BlockAddress yet."); } } diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 6982e74562..5f93a8d3ca 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -213,6 +213,5 @@ GenericValue MCJIT::runFunction(Function *F, } } - assert(0 && "Full-featured argument passing not supported yet!"); - return GenericValue(); + llvm_unreachable("Full-featured argument passing not supported yet!"); } 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<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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index 669ff4c6f8..4be91d347b 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/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); |