[frontend] Make -chain-include work when used with modules.
llvm-svn: 180633
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp
index a17def0..cde84ca 100644
--- a/clang/lib/Frontend/ChainedIncludesSource.cpp
+++ b/clang/lib/Frontend/ChainedIncludesSource.cpp
@@ -143,6 +143,7 @@
Clang->getASTConsumer().GetASTDeserializationListener()));
if (!Reader)
return 0;
+ Clang->setModuleManager(static_cast<ASTReader*>(Reader.get()));
Clang->getASTContext().setExternalSource(Reader);
}