mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
[cleanup] Switch to using range-based for loops in two very obvious
places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219095 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3d7f9c18d
commit
24a19341bb
@ -63,10 +63,8 @@ void PassRegistry::registerPass(const PassInfo &PI, bool ShouldFree) {
|
||||
PassInfoStringMap[PI.getPassArgument()] = Π
|
||||
|
||||
// Notify any listeners.
|
||||
for (std::vector<PassRegistrationListener *>::iterator I = Listeners.begin(),
|
||||
E = Listeners.end();
|
||||
I != E; ++I)
|
||||
(*I)->passRegistered(&PI);
|
||||
for (auto *Listener : Listeners)
|
||||
Listener->passRegistered(&PI);
|
||||
|
||||
if (ShouldFree)
|
||||
ToFree.push_back(std::unique_ptr<const PassInfo>(&PI));
|
||||
@ -84,8 +82,8 @@ void PassRegistry::unregisterPass(const PassInfo &PI) {
|
||||
|
||||
void PassRegistry::enumerateWith(PassRegistrationListener *L) {
|
||||
sys::SmartScopedReader<true> Guard(Lock);
|
||||
for (auto I = PassInfoMap.begin(), E = PassInfoMap.end(); I != E; ++I)
|
||||
L->passEnumerate(I->second);
|
||||
for (auto PassInfoPair : PassInfoMap)
|
||||
L->passEnumerate(PassInfoPair.second);
|
||||
}
|
||||
|
||||
/// Analysis Group Mechanisms.
|
||||
|
Loading…
x
Reference in New Issue
Block a user