aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ChainedIncludesSource.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-06-29 23:23:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-06-29 23:23:46 +0000
commitdbafb6c3384301f6217b6ad851eceae3a363c243 (patch)
tree33286187a42aa672a0b33e1a4a1fa9ef6d8e4083 /clang/lib/Frontend/ChainedIncludesSource.cpp
parentd676ab13540473bdb15c2d204e4cd84bf1fcea93 (diff)
downloadllvm-dbafb6c3384301f6217b6ad851eceae3a363c243.zip
llvm-dbafb6c3384301f6217b6ad851eceae3a363c243.tar.gz
llvm-dbafb6c3384301f6217b6ad851eceae3a363c243.tar.bz2
Teach ASTReader how to read only the Preprocessor state from an AST file, not the ASTContext state.
We use this when running a preprocessor-only action on an AST file in order to avoid paying the runtime cost of loading the extra information. llvm-svn: 306760
Diffstat (limited to 'clang/lib/Frontend/ChainedIncludesSource.cpp')
-rw-r--r--clang/lib/Frontend/ChainedIncludesSource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp
index b984c2e..534c758 100644
--- a/clang/lib/Frontend/ChainedIncludesSource.cpp
+++ b/clang/lib/Frontend/ChainedIncludesSource.cpp
@@ -83,7 +83,7 @@ createASTReader(CompilerInstance &CI, StringRef pchFile,
ASTDeserializationListener *deserialListener = nullptr) {
Preprocessor &PP = CI.getPreprocessor();
std::unique_ptr<ASTReader> Reader;
- Reader.reset(new ASTReader(PP, CI.getASTContext(),
+ Reader.reset(new ASTReader(PP, &CI.getASTContext(),
CI.getPCHContainerReader(),
/*Extensions=*/{ },
/*isysroot=*/"", /*DisableValidation=*/true));