[llvm] 7275de7 - [AArch64] translateLocChar - silence dead code warning
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 6 08:32:25 PST 2022
Author: Simon Pilgrim
Date: 2022-02-06T16:32:16Z
New Revision: 7275de7fb2f087871611d037d1b529b226dd0521
URL: https://github.com/llvm/llvm-project/commit/7275de7fb2f087871611d037d1b529b226dd0521
DIFF: https://github.com/llvm/llvm-project/commit/7275de7fb2f087871611d037d1b529b226dd0521.diff
LOG: [AArch64] translateLocChar - silence dead code warning
Remove default case from switch and return None after the switch()
Added:
Modified:
llvm/lib/Support/FormatVariadic.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/FormatVariadic.cpp b/llvm/lib/Support/FormatVariadic.cpp
index f6d48bcd50e8..46573e745247 100644
--- a/llvm/lib/Support/FormatVariadic.cpp
+++ b/llvm/lib/Support/FormatVariadic.cpp
@@ -18,10 +18,8 @@ static Optional<AlignStyle> translateLocChar(char C) {
return AlignStyle::Center;
case '+':
return AlignStyle::Right;
- default:
- return None;
}
- LLVM_BUILTIN_UNREACHABLE;
+ return None;
}
bool formatv_object_base::consumeFieldLayout(StringRef &Spec, AlignStyle &Where,
More information about the llvm-commits
mailing list