From 15e8b0fd3decd6c3ceca1986a422ac5a8fc640f2 Mon Sep 17 00:00:00 2001 From: kennytm Date: Tue, 8 Aug 2017 16:17:33 +0800 Subject: [PATCH] Fix covered-switch-default warnings in PassWrapper (See #39063 for explanation) --- src/rustllvm/PassWrapper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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