DomTreeUpdater::dump() - use const auto& iterator in for-range-loop.

Avoids unnecessary copies and silences clang tidy warning.
This commit is contained in:
Simon Pilgrim 2020-07-10 12:47:02 +01:00
parent a25487fd8c
commit b69e0f674f
1 changed files with 2 additions and 2 deletions

View File

@ -507,7 +507,7 @@ LLVM_DUMP_METHOD void DomTreeUpdater::dump() const {
OS << "Pending DeletedBBs:\n";
Index = 0;
for (auto BB : DeletedBBs) {
for (const auto &BB : DeletedBBs) {
OS << " " << Index << " : ";
++Index;
if (BB->hasName())
@ -519,7 +519,7 @@ LLVM_DUMP_METHOD void DomTreeUpdater::dump() const {
OS << "Pending Callbacks:\n";
Index = 0;
for (auto BB : Callbacks) {
for (const auto &BB : Callbacks) {
OS << " " << Index << " : ";
++Index;
if (BB->hasName())