[llvm] 1bd01de - [VE] Remove switch with only default case statement to fix MSVC warning. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 08:38:04 PST 2021
Author: Simon Pilgrim
Date: 2021-12-01T16:37:48Z
New Revision: 1bd01defff8a21ea714b4cfd3fffadb7b71e3e58
URL: https://github.com/llvm/llvm-project/commit/1bd01defff8a21ea714b4cfd3fffadb7b71e3e58
DIFF: https://github.com/llvm/llvm-project/commit/1bd01defff8a21ea714b4cfd3fffadb7b71e3e58.diff
LOG: [VE] Remove switch with only default case statement to fix MSVC warning. NFC.
Added:
Modified:
llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp b/llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp
index 1fe9423e01b80..b725f6ae34054 100644
--- a/llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp
+++ b/llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp
@@ -62,13 +62,10 @@ void VEInstPrinter::printOperand(const MCInst *MI, int OpNum,
}
if (MO.isImm()) {
- switch (MI->getOpcode()) {
- default:
- // Expects signed 32bit literals
- int32_t TruncatedImm = static_cast<int32_t>(MO.getImm());
- O << TruncatedImm;
- return;
- }
+ // Expects signed 32bit literals.
+ int32_t TruncatedImm = static_cast<int32_t>(MO.getImm());
+ O << TruncatedImm;
+ return;
}
assert(MO.isExpr() && "Unknown operand kind in printOperand");
More information about the llvm-commits
mailing list