aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-04 23:32:19 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-04 23:32:19 +0000
commitb7a7819473709c01ea024a2dc15e99d38f0f8760 (patch)
tree5fbbadeec73aba8aed448bfaf2f67401042d1b0d /lib/Frontend/FrontendActions.cpp
parente5e42ae2694f2c4709dac3d84e3e6e5fac86c244 (diff)
Store the submodules of a module in source order, as they are stored
in the module map. This provides a bit more predictability for the user, as well as eliminating the need to sort the submodules when serializing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FrontendActions.cpp')
-rw-r--r--lib/Frontend/FrontendActions.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index dd98fcf3eb..d9a385d232 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -186,11 +186,10 @@ static void collectModuleHeaderIncludes(const LangOptions &LangOpts,
}
// Recurse into submodules.
- for (llvm::StringMap<clang::Module *>::iterator
- Sub = Module->SubModules.begin(),
- SubEnd = Module->SubModules.end();
+ for (clang::Module::submodule_iterator Sub = Module->submodule_begin(),
+ SubEnd = Module->submodule_end();
Sub != SubEnd; ++Sub)
- collectModuleHeaderIncludes(LangOpts, Sub->getValue(), Includes);
+ collectModuleHeaderIncludes(LangOpts, *Sub, Includes);
}
bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI,