[DomTreeUpdater] Use const auto * when iterating over pointers (NFC).
This silences the warning below:
llvm-project/llvm/lib/Analysis/DomTreeUpdater.cpp:510:20: warning: loop variable 'BB' is always a copy because the range of type 'const SmallPtrSet<llvm::BasicBlock *, 8>' does not return a reference [-Wrange-loop-analysis]
for (const auto &BB : DeletedBBs) {
^
llvm-project/llvm/lib/Analysis/DomTreeUpdater.cpp:510:8: note: use non-reference type 'llvm::BasicBlock *'
for (const auto &BB : DeletedBBs) {
^~~~~~~~~~~~~~~~
1 warning generated.
This commit is contained in:
@@ -507,7 +507,7 @@ LLVM_DUMP_METHOD void DomTreeUpdater::dump() const {
|
||||
|
||||
OS << "Pending DeletedBBs:\n";
|
||||
Index = 0;
|
||||
for (const auto &BB : DeletedBBs) {
|
||||
for (const auto *BB : DeletedBBs) {
|
||||
OS << " " << Index << " : ";
|
||||
++Index;
|
||||
if (BB->hasName())
|
||||
|
||||
Reference in New Issue
Block a user