diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index bca0881c08c5a..ba0c4fbe173bb 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -278,10 +278,12 @@ static Optional fromRust(LLVMRustRelocMode RustReloc) { return Reloc::RWPI; case LLVMRustRelocMode::ROPIRWPI: return Reloc::ROPI_RWPI; -#endif +#else default: - llvm_unreachable("Bad RelocModel."); + break; +#endif } + llvm_unreachable("Bad RelocModel."); } #if LLVM_RUSTLLVM