aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-07-08 22:01:51 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-07-08 22:01:51 +0000
commita93e3b5bde9f0a7b59215f19f176f7d69881b81c (patch)
tree8370d623fa21547d38f09c84df7b6559531f8f91 /lib/Frontend/CompilerInstance.cpp
parent80db8cbff5afc047a23dbfe11f7ef787d891feec (diff)
Some preparatory work for chained PCH. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 0ff70edf8b..fa5338d30e 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -255,6 +255,8 @@ void CompilerInstance::createPCHExternalASTSource(llvm::StringRef Path) {
llvm::OwningPtr<ExternalASTSource> Source;
Source.reset(createPCHExternalASTSource(Path, getHeaderSearchOpts().Sysroot,
getPreprocessor(), getASTContext()));
+ // Remember the PCHReader, but in a non-owning way.
+ Reader = static_cast<PCHReader*>(Source.get());
getASTContext().setExternalSource(Source);
}