Wire up -import-module to run ReadAST for each module loaded.
llvm-svn: 136987
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user