[llvm] be51737 - Fix "not all control paths return a value" MSVC warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 5 11:42:48 PDT 2021
Author: Simon Pilgrim
Date: 2021-06-05T19:42:00+01:00
New Revision: be51737f59875fd8b3451fc7a8363be1283e0ca2
URL: https://github.com/llvm/llvm-project/commit/be51737f59875fd8b3451fc7a8363be1283e0ca2
DIFF: https://github.com/llvm/llvm-project/commit/be51737f59875fd8b3451fc7a8363be1283e0ca2.diff
LOG: Fix "not all control paths return a value" MSVC warning. NFCI.
Added:
Modified:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
index 2840657f18c22..0462c3628ed39 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
@@ -123,7 +123,7 @@ unsigned RISCVVType::encodeVTYPE(RISCVII::VLMUL VLMUL, unsigned SEW,
std::pair<unsigned, bool> RISCVVType::decodeVLMUL(RISCVII::VLMUL VLMUL) {
switch (VLMUL) {
- case RISCVII::VLMUL::LMUL_RESERVED:
+ default:
llvm_unreachable("Unexpected LMUL value!");
case RISCVII::VLMUL::LMUL_1:
case RISCVII::VLMUL::LMUL_2:
More information about the llvm-commits
mailing list