summaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTMerge.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
commit9f28442d72ed8db4ce56d163e9ea2355cf7cb4ae (patch)
tree1ff185037d33207158f2a19a7aea2a88126ca271 /lib/Frontend/ASTMerge.cpp
parentfe7b37a8ff38f40535f98de2e7b72bdd185cd1ae (diff)
downloadclang-9f28442d72ed8db4ce56d163e9ea2355cf7cb4ae.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTMerge.cpp')
-rw-r--r--lib/Frontend/ASTMerge.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp
index 986f98ae59..354527db7b 100644
--- a/lib/Frontend/ASTMerge.cpp
+++ b/lib/Frontend/ASTMerge.cpp
@@ -44,9 +44,9 @@ void ASTMergeAction::ExecuteAction() {
new ForwardingDiagnosticConsumer(
*CI.getDiagnostics().getClient()),
/*ShouldOwnClient=*/true));
- std::unique_ptr<ASTUnit> Unit =
- ASTUnit::LoadFromASTFile(ASTFiles[I], CI.getPCHContainerReader(),
- Diags, CI.getFileSystemOpts(), false);
+ std::unique_ptr<ASTUnit> Unit = ASTUnit::LoadFromASTFile(
+ ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags,
+ CI.getFileSystemOpts(), false);
if (!Unit)
continue;