Skip to content

Commit d12ece2

Browse files
[CodeGen] Use a range-based for loop (NFC)
1 parent b3ec059 commit d12ece2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/CGDeclCXX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {
675675
AllImports.insert(M);
676676
// Ones that we import in the global module fragment or the private module
677677
// fragment.
678-
llvm::for_each(Primary->submodules(), [&AllImports](Module *SubM) {
678+
for (Module *SubM : Primary->submodules()) {
679679
assert((SubM->isGlobalModule() || SubM->isPrivateModule()) &&
680680
"The sub modules of C++20 module unit should only be global module "
681681
"fragments or private module framents.");
@@ -684,7 +684,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {
684684
"not allowed to export import modules.");
685685
for (Module *M : SubM->Imports)
686686
AllImports.insert(M);
687-
});
687+
}
688688

689689
SmallVector<llvm::Function *, 8> ModuleInits;
690690
for (Module *M : AllImports) {

0 commit comments

Comments
 (0)