mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
[rustllvm] Use report_fatal_error over llvm_unreachable
This makes it more robust when assertions are disabled, crashing instead of causing UB. Also introduces a tidy check to enforce this rule, which in turn necessitated making tidy run on src/rustllvm. Fixes #44020
This commit is contained in:
@@ -66,7 +66,7 @@ static Archive::Kind fromRust(LLVMRustArchiveKind Kind) {
|
||||
case LLVMRustArchiveKind::COFF:
|
||||
return Archive::K_COFF;
|
||||
default:
|
||||
llvm_unreachable("Bad ArchiveKind.");
|
||||
report_fatal_error("Bad ArchiveKind.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user