aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-01-05 18:39:32 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-01-05 18:39:32 +0000
commitda32d7f1479d3b8016af0da55a15c13cd1369d94 (patch)
treeca8442806cf37b8334d96f916c28a529a5ca72c9 /clang/lib/CodeGen/CodeGenModule.cpp
parent25a02c12f117721100f07197a8c4c85bcff1d126 (diff)
downloadllvm-da32d7f1479d3b8016af0da55a15c13cd1369d94.zip
llvm-da32d7f1479d3b8016af0da55a15c13cd1369d94.tar.gz
llvm-da32d7f1479d3b8016af0da55a15c13cd1369d94.tar.bz2
CodeGen: switch iteration to range based for loop (NFC)
Change a loop to range based instead while working on cleaning up some modules autolinking issues on Linux. NFC. llvm-svn: 350472
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index b398f98..b9466fe 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1746,16 +1746,14 @@ void CodeGenModule::EmitModuleLinkOptions() {
bool AnyChildren = false;
// Visit the submodules of this module.
- for (clang::Module::submodule_iterator Sub = Mod->submodule_begin(),
- SubEnd = Mod->submodule_end();
- Sub != SubEnd; ++Sub) {
+ for (const auto &SM : Mod->submodules()) {
// Skip explicit children; they need to be explicitly imported to be
// linked against.
- if ((*Sub)->IsExplicit)
+ if (SM->IsExplicit)
continue;
- if (Visited.insert(*Sub).second) {
- Stack.push_back(*Sub);
+ if (Visited.insert(SM).second) {
+ Stack.push_back(SM);
AnyChildren = true;
}
}