summaryrefslogtreecommitdiffstats
path: root/tools/diagtool
diff options
context:
space:
mode:
Diffstat (limited to 'tools/diagtool')
-rw-r--r--tools/diagtool/DiagTool.cpp2
-rw-r--r--tools/diagtool/ListWarnings.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/diagtool/DiagTool.cpp b/tools/diagtool/DiagTool.cpp
index 44bc83e545..0e4d8088c6 100644
--- a/tools/diagtool/DiagTool.cpp
+++ b/tools/diagtool/DiagTool.cpp
@@ -36,7 +36,7 @@ DiagTool *DiagTools::getTool(llvm::StringRef toolCmd) {
}
void DiagTools::registerTool(DiagTool *tool) {
- getTools(tools)->GetOrCreateValue(tool->getName(), tool);
+ (*getTools(tools))[tool->getName()] = tool;
}
void DiagTools::printCommands(llvm::raw_ostream &out) {
diff --git a/tools/diagtool/ListWarnings.cpp b/tools/diagtool/ListWarnings.cpp
index 16837a1584..5a26fc2282 100644
--- a/tools/diagtool/ListWarnings.cpp
+++ b/tools/diagtool/ListWarnings.cpp
@@ -73,7 +73,7 @@ int ListWarnings::run(unsigned int argc, char **argv, llvm::raw_ostream &out) {
Unflagged.push_back(entry);
else {
Flagged.push_back(entry);
- flagHistogram.GetOrCreateValue(entry.Flag).getValue().push_back(diagID);
+ flagHistogram[entry.Flag].push_back(diagID);
}
}
@@ -99,7 +99,7 @@ int ListWarnings::run(unsigned int argc, char **argv, llvm::raw_ostream &out) {
<< llvm::format("%.4g", avgDiagsPerFlag) << '\n';
out << " Number in -Wpedantic (not covered by other -W flags): "
- << flagHistogram.GetOrCreateValue("pedantic").getValue().size()
+ << flagHistogram["pedantic"].size()
<< '\n';
out << '\n';