diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-07-09 11:26:08 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-07-09 11:37:49 +0100 |
commit | 58a85717cce5166b0952aee4d13375dda94f7497 (patch) | |
tree | cedacafc2c7e21e81deb8e846d3ecd81167e7886 /llvm/lib/Support/DebugCounter.cpp | |
parent | 6a3b10e294feceb94064f32450de5c068a13dd03 (diff) | |
download | llvm-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.cpp | 2 |
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; |