diff options
author | Daniel Jasper <djasper@google.com> | 2013-09-24 09:27:13 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-09-24 09:27:13 +0000 |
commit | ca9f73812c998559c53b8215f868152caf68e2cf (patch) | |
tree | 4f73cc4d41580fe4fe0f1577d41911217bc239ae /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | ba7f2f7110c201e3564e89bd306e058aa9c6b881 (diff) | |
download | bcm5719-llvm-ca9f73812c998559c53b8215f868152caf68e2cf.tar.gz bcm5719-llvm-ca9f73812c998559c53b8215f868152caf68e2cf.zip |
Add -fmodule-map-file option.
With this option, arbitrarily named module map files can be specified
to be loaded as required for headers in the respective (sub)directories.
This, together with the extern module declaration allows for specifying
module maps in a modular fashion without the need for files called
"module.map".
Among other things, this allows a directory to contain two modules that
are completely independent of one another.
Review: http://llvm-reviews.chandlerc.com/D1697.
llvm-svn: 191284
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c8c676899c5..afba109453d 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -896,6 +896,9 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { StringRef MacroDef = (*it)->getValue(); Opts.ModulesIgnoreMacros.insert(MacroDef.split('=').first); } + std::vector<std::string> ModuleMapFiles = + Args.getAllArgValues(OPT_fmodule_map_file); + Opts.ModuleMapFiles.insert(ModuleMapFiles.begin(), ModuleMapFiles.end()); // Add -I..., -F..., and -index-header-map options in order. bool IsIndexHeaderMap = false; |