summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-04-26 21:33:27 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-04-26 21:33:27 +0000
commit24ec769058dcb5ae86c3edfa4b8dee787d888763 (patch)
tree28e944c049ea6955d69d60c6d933d1087168334a /clang/lib/Frontend/FrontendAction.cpp
parent139cfc2e63ddb83a6e9ab668ea806597057f47a2 (diff)
downloadbcm5719-llvm-24ec769058dcb5ae86c3edfa4b8dee787d888763.tar.gz
bcm5719-llvm-24ec769058dcb5ae86c3edfa4b8dee787d888763.zip
[frontend] Make -chain-include work when used with modules.
llvm-svn: 180633
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 6031ad2b361..ece51a35707 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -294,6 +294,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
source.reset(ChainedIncludesSource::create(CI));
if (!source)
goto failure;
+ CI.setModuleManager(static_cast<ASTReader*>(
+ &static_cast<ChainedIncludesSource*>(source.get())->getFinalReader()));
CI.getASTContext().setExternalSource(source);
} else if (!CI.getPreprocessorOpts().ImplicitPCHInclude.empty()) {
OpenPOWER on IntegriCloud