aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorBen Barham <ben_barham@apple.com>2020-11-17 17:25:50 -0800
committerArgyrios Kyrtzidis <kyrtzidis@apple.com>2020-11-17 17:27:50 -0800
commit5834996fefc937d6211dc8c8a5b200068753391a (patch)
tree13cb5ce724739d084d3a0a401ed55c84dc07afc7 /clang/lib/Frontend/ASTUnit.cpp
parentf4c6080ab820219c5bf78b0c2143e7fa194da296 (diff)
downloadllvm-5834996fefc937d6211dc8c8a5b200068753391a.zip
llvm-5834996fefc937d6211dc8c8a5b200068753391a.tar.gz
llvm-5834996fefc937d6211dc8c8a5b200068753391a.tar.bz2
[Frontend] Add flag to allow PCM generation despite compiler errors
As with precompiled headers, it's useful for indexers to be able to continue through compiler errors in dependent modules. Resolves rdar://69816264 Reviewed By: akyrtzi Differential Revision: https://reviews.llvm.org/D91580
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index a112117..c2aba41 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -759,7 +759,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
const FileSystemOptions &FileSystemOpts, bool UseDebugInfo,
bool OnlyLocalDecls, ArrayRef<RemappedFile> RemappedFiles,
- CaptureDiagsKind CaptureDiagnostics, bool AllowPCHWithCompilerErrors,
+ CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors,
bool UserFilesAreVolatile) {
std::unique_ptr<ASTUnit> AST(new ASTUnit(true));
@@ -819,7 +819,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
AST->Reader = new ASTReader(
PP, *AST->ModuleCache, AST->Ctx.get(), PCHContainerRdr, {},
/*isysroot=*/"",
- /*DisableValidation=*/disableValid, AllowPCHWithCompilerErrors);
+ /*DisableValidation=*/disableValid, AllowASTWithCompilerErrors);
AST->Reader->setListener(std::make_unique<ASTInfoCollector>(
*AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts,