[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:
Florian Hahn 2020-07-10 16:39:15 +01:00
parent 0dc7bfbdbb
commit b0f4fcf84e

View File

@ -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())