We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 646aa81 commit 1ad3180Copy full SHA for 1ad3180
llvm/tools/llvm-remarkutil/RemarkCounter.cpp
@@ -198,12 +198,8 @@ void ArgumentCounter::collect(const Remark &Remark) {
198
}
199
200
void RemarkCounter::collect(const Remark &Remark) {
201
- std::optional<std::string> Key = getGroupByKey(Remark);
202
- if (!Key.has_value())
203
- return;
204
- auto Iter = CountedByRemarksMap.insert({*Key, 1});
205
- if (!Iter.second)
206
- Iter.first->second += 1;
+ if (std::optional<std::string> Key = getGroupByKey(Remark))
+ ++CountedByRemarksMap[*Key];
207
208
209
Error ArgumentCounter::print(StringRef OutputFileName) {
0 commit comments