summaryrefslogtreecommitdiffstats
path: root/clang/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
commitdbafb6c3384301f6217b6ad851eceae3a363c243 (patch)
tree33286187a42aa672a0b33e1a4a1fa9ef6d8e4083 /clang/lib/Frontend/ASTMerge.cpp
parentd676ab13540473bdb15c2d204e4cd84bf1fcea93 (diff)
downloadbcm5719-llvm-dbafb6c3384301f6217b6ad851eceae3a363c243.tar.gz
bcm5719-llvm-dbafb6c3384301f6217b6ad851eceae3a363c243.zip
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/ASTMerge.cpp')
-rw-r--r--clang/lib/Frontend/ASTMerge.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/ASTMerge.cpp b/clang/lib/Frontend/ASTMerge.cpp
index 986f98ae598..354527db7ba 100644
--- a/clang/lib/Frontend/ASTMerge.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud