summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-09 19:21:46 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-09 19:21:46 +0000
commit62d311fdf435365b85db4af13e7d93a22673bf81 (patch)
tree2de6d5d15fec94d9d3f48e6165cdcaf8eb40b11b /clang/lib/Frontend/CompilerInvocation.cpp
parent499b4e3387302c99a7923e0204ddbedb336e506f (diff)
downloadbcm5719-llvm-62d311fdf435365b85db4af13e7d93a22673bf81.tar.gz
bcm5719-llvm-62d311fdf435365b85db4af13e7d93a22673bf81.zip
Introduce a testbed for merging multiple ASTs into a single AST
context with the AST importer. WIP, still useless but at least it has a test. llvm-svn: 95683
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 5b64c7e639c..006f3c095ca 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -367,6 +367,10 @@ static void FrontendOptsToArgs(const FrontendOptions &Opts,
Res.push_back("-load");
Res.push_back(Opts.Plugins[i]);
}
+ for (unsigned i = 0, e = Opts.ASTMergeFiles.size(); i != e; ++i) {
+ Res.push_back("-ast-merge");
+ Res.push_back(Opts.ASTMergeFiles[i]);
+ }
}
static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts,
@@ -929,6 +933,7 @@ ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Diagnostic &Diags) {
Opts.ShowTimers = Args.hasArg(OPT_ftime_report);
Opts.ShowVersion = Args.hasArg(OPT_version);
Opts.ViewClassInheritance = getLastArgValue(Args, OPT_cxx_inheritance_view);
+ Opts.ASTMergeFiles = getAllArgValues(Args, OPT_ast_merge);
FrontendOptions::InputKind DashX = FrontendOptions::IK_None;
if (const Arg *A = Args.getLastArg(OPT_x)) {
OpenPOWER on IntegriCloud