[llvm] aa530c7 - [Passes] Use a range-based for loop with llvm::successors (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 20 14:30:46 PST 2024
Author: Kazu Hirata
Date: 2024-01-20T14:30:34-08:00
New Revision: aa530c7d0091f9536485385e2c6fa7342d04afd5
URL: https://github.com/llvm/llvm-project/commit/aa530c7d0091f9536485385e2c6fa7342d04afd5
DIFF: https://github.com/llvm/llvm-project/commit/aa530c7d0091f9536485385e2c6fa7342d04afd5.diff
LOG: [Passes] Use a range-based for loop with llvm::successors (NFC)
Added:
Modified:
llvm/lib/Passes/StandardInstrumentations.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index d467fe5c9a8e74e..aea8acebcb83087 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -2119,8 +2119,8 @@ DCData::DCData(const BasicBlock &B) {
addSuccessorLabel(C.getCaseSuccessor()->getName().str(), Value);
}
} else
- for (const_succ_iterator I = succ_begin(&B), E = succ_end(&B); I != E; ++I)
- addSuccessorLabel((*I)->getName().str(), "");
+ for (const BasicBlock *Succ : successors(&B))
+ addSuccessorLabel(Succ->getName().str(), "");
}
DotCfgChangeReporter::DotCfgChangeReporter(bool Verbose)
More information about the llvm-commits
mailing list