forked from OSchip/llvm-project
DomTreeUpdater::dump() - use const auto& iterator in for-range-loop.
Avoids unnecessary copies and silences clang tidy warning.
This commit is contained in:
parent
a25487fd8c
commit
b69e0f674f
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue