[clang] d12ece2 - [CodeGen] Use a range-based for loop (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 10 18:57:30 PDT 2023
Author: Kazu Hirata
Date: 2023-10-10T18:57:16-07:00
New Revision: d12ece2ecbb6065797c826c2e70d8f8a642b8eb0
URL: https://github.com/llvm/llvm-project/commit/d12ece2ecbb6065797c826c2e70d8f8a642b8eb0
DIFF: https://github.com/llvm/llvm-project/commit/d12ece2ecbb6065797c826c2e70d8f8a642b8eb0.diff
LOG: [CodeGen] Use a range-based for loop (NFC)
Added:
Modified:
clang/lib/CodeGen/CGDeclCXX.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp
index 30683ad474cd2c0..e10617162733bba 100644
--- a/clang/lib/CodeGen/CGDeclCXX.cpp
+++ b/clang/lib/CodeGen/CGDeclCXX.cpp
@@ -675,7 +675,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {
AllImports.insert(M);
// Ones that we import in the global module fragment or the private module
// fragment.
- llvm::for_each(Primary->submodules(), [&AllImports](Module *SubM) {
+ for (Module *SubM : Primary->submodules()) {
assert((SubM->isGlobalModule() || SubM->isPrivateModule()) &&
"The sub modules of C++20 module unit should only be global module "
"fragments or private module framents.");
@@ -684,7 +684,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {
"not allowed to export import modules.");
for (Module *M : SubM->Imports)
AllImports.insert(M);
- });
+ }
SmallVector<llvm::Function *, 8> ModuleInits;
for (Module *M : AllImports) {
More information about the cfe-commits
mailing list