[llvm] 4f46945 - [llvm-remarkutil] Silence a GCC warning about missing returns after a fully covered switch. NFC.
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 13 00:33:41 PDT 2023
Author: Martin Storsjö
Date: 2023-10-13T10:33:17+03:00
New Revision: 4f4694509d293bf715dcbf0df339c801a044e114
URL: https://github.com/llvm/llvm-project/commit/4f4694509d293bf715dcbf0df339c801a044e114
DIFF: https://github.com/llvm/llvm-project/commit/4f4694509d293bf715dcbf0df339c801a044e114.diff
LOG: [llvm-remarkutil] Silence a GCC warning about missing returns after a fully covered switch. NFC.
Added:
Modified:
llvm/tools/llvm-remarkutil/RemarkCounter.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-remarkutil/RemarkCounter.cpp b/llvm/tools/llvm-remarkutil/RemarkCounter.cpp
index fa05f4fda95fba1..8bde0b883018284 100644
--- a/llvm/tools/llvm-remarkutil/RemarkCounter.cpp
+++ b/llvm/tools/llvm-remarkutil/RemarkCounter.cpp
@@ -181,6 +181,7 @@ std::optional<std::string> Counter::getGroupByKey(const Remark &Remark) {
return Remark.Loc->SourceFilePath.str() + ":" + Remark.FunctionName.str();
return Remark.Loc->SourceFilePath.str();
}
+ llvm_unreachable("Fully covered switch above!");
}
void ArgumentCounter::collect(const Remark &Remark) {
More information about the llvm-commits
mailing list