aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/DebugCounter.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-07-09 11:26:08 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-07-09 11:37:49 +0100
commit58a85717cce5166b0952aee4d13375dda94f7497 (patch)
treecedacafc2c7e21e81deb8e846d3ecd81167e7886 /llvm/lib/Support/DebugCounter.cpp
parent6a3b10e294feceb94064f32450de5c068a13dd03 (diff)
downloadllvm-58a85717cce5166b0952aee4d13375dda94f7497.zip
llvm-58a85717cce5166b0952aee4d13375dda94f7497.tar.gz
llvm-58a85717cce5166b0952aee4d13375dda94f7497.tar.bz2
DebugCounterList::printOptionInfo - use const auto& iterator in for-range-loop.
Avoids unnecessary copies and silences clang tidy warning.
Diffstat (limited to 'llvm/lib/Support/DebugCounter.cpp')
-rw-r--r--llvm/lib/Support/DebugCounter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp
index 713b419..8c579f3 100644
--- a/llvm/lib/Support/DebugCounter.cpp
+++ b/llvm/lib/Support/DebugCounter.cpp
@@ -31,7 +31,7 @@ private:
// width, so we do the same.
Option::printHelpStr(HelpStr, GlobalWidth, ArgStr.size() + 6);
const auto &CounterInstance = DebugCounter::instance();
- for (auto Name : CounterInstance) {
+ for (const auto &Name : CounterInstance) {
const auto Info =
CounterInstance.getCounterInfo(CounterInstance.getCounterId(Name));
size_t NumSpaces = GlobalWidth - Info.first.size() - 8;