Skip to content

Commit 15e8b0f

Browse files
committed
Fix covered-switch-default warnings in PassWrapper
(See #39063 for explanation)
1 parent 7c4e1a5 commit 15e8b0f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rustllvm/PassWrapper.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,12 @@ static Optional<Reloc::Model> fromRust(LLVMRustRelocMode RustReloc) {
278278
return Reloc::RWPI;
279279
case LLVMRustRelocMode::ROPIRWPI:
280280
return Reloc::ROPI_RWPI;
281-
#endif
281+
#else
282282
default:
283-
llvm_unreachable("Bad RelocModel.");
283+
break;
284+
#endif
284285
}
286+
llvm_unreachable("Bad RelocModel.");
285287
}
286288

287289
#if LLVM_RUSTLLVM

0 commit comments

Comments
 (0)