aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ChainedIncludesSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Serialization/ChainedIncludesSource.cpp')
-rw-r--r--lib/Serialization/ChainedIncludesSource.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Serialization/ChainedIncludesSource.cpp b/lib/Serialization/ChainedIncludesSource.cpp
index 56174c1629..aba1eae3d3 100644
--- a/lib/Serialization/ChainedIncludesSource.cpp
+++ b/lib/Serialization/ChainedIncludesSource.cpp
@@ -94,6 +94,8 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) {
Clang->createFileManager();
Clang->createSourceManager(Clang->getFileManager());
Clang->createPreprocessor();
+ Clang->getDiagnosticClient().BeginSourceFile(Clang->getLangOpts(),
+ &Clang->getPreprocessor());
Clang->createASTContext();
llvm::SmallVector<char, 256> serialAST;
@@ -136,6 +138,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) {
ParseAST(Clang->getSema());
OS.flush();
+ Clang->getDiagnosticClient().EndSourceFile();
serialBufs.push_back(
llvm::MemoryBuffer::getMemBufferCopy(llvm::StringRef(serialAST.data(),
serialAST.size())));