diff options
author | Jonathan D. Turner <jonathan.d.turner@gmail.com> | 2011-08-05 22:17:03 +0000 |
---|---|---|
committer | Jonathan D. Turner <jonathan.d.turner@gmail.com> | 2011-08-05 22:17:03 +0000 |
commit | e735e2deb9e57d9b62c1258ee236ccfeba8e84b2 (patch) | |
tree | f26b2f682bdf2d4c7d5dea638986937a7abcf6f4 /lib/Frontend/CompilerInvocation.cpp | |
parent | c25175cb1ac819fd73b33bceb43c84ca17715763 (diff) |
Wire up -import-module to run ReadAST for each module loaded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index b2bd759dc2..88c972c828 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -775,6 +775,10 @@ static void PreprocessorOptsToArgs(const PreprocessorOptions &Opts, Res.push_back("-include"); Res.push_back(Opts.Includes[i]); } + for (unsigned i = 0, e = Opts.Modules.size(); i != e; ++i) { + Res.push_back("-import_module"); + Res.push_back(Opts.Modules[i]); + } for (unsigned i = 0, e = Opts.MacroIncludes.size(); i != e; ++i) { Res.push_back("-imacros"); Res.push_back(Opts.MacroIncludes[i]); @@ -1807,6 +1811,12 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, Opts.ChainedIncludes.push_back(A->getValue(Args)); } + for (arg_iterator it = Args.filtered_begin(OPT_import_module), + ie = Args.filtered_end(); it != ie; ++it) { + const Arg *A = *it; + Opts.Modules.push_back(A->getValue(Args)); + } + // Include 'altivec.h' if -faltivec option present if (Args.hasArg(OPT_faltivec)) Opts.Includes.push_back("altivec.h"); |