mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 06:16:06 +00:00
[llvm] Use range-based for loops with llvm::drop_begin (NFC)
This commit is contained in:
parent
0e93d04001
commit
96f14ea618
@ -1108,8 +1108,8 @@ void ValueEnumerator::purgeFunction() {
|
||||
/// Remove purged values from the ValueMap.
|
||||
for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i)
|
||||
ValueMap.erase(Values[i].first);
|
||||
for (unsigned i = NumModuleMDs, e = MDs.size(); i != e; ++i)
|
||||
MetadataMap.erase(MDs[i]);
|
||||
for (const Metadata *MD : llvm::drop_begin(MDs, NumModuleMDs))
|
||||
MetadataMap.erase(MD);
|
||||
for (const BasicBlock *BB : BasicBlocks)
|
||||
ValueMap.erase(BB);
|
||||
|
||||
|
@ -332,9 +332,8 @@ llvm::MachO::convertToInterfaceFile(const Records &Slices) {
|
||||
}
|
||||
|
||||
File = createInterfaceFile(Slices, *InstallNames.begin());
|
||||
for (auto it = std::next(InstallNames.begin()); it != InstallNames.end();
|
||||
++it)
|
||||
File->addDocument(createInterfaceFile(Slices, *it));
|
||||
for (StringRef IN : llvm::drop_begin(InstallNames))
|
||||
File->addDocument(createInterfaceFile(Slices, IN));
|
||||
|
||||
return File;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user