aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-07 01:51:17 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-07 01:51:17 +0000
commit4a280ff48fd6194d5fe06df21b057d30af93a386 (patch)
tree2a904ffe7ce2cd1dcf1214b18eccd09cbe3ea5ab /clang/lib/Frontend/FrontendAction.cpp
parent9b2ab81a0c37d1adbf7924823ac923045a543eed (diff)
downloadllvm-4a280ff48fd6194d5fe06df21b057d30af93a386.zip
llvm-4a280ff48fd6194d5fe06df21b057d30af93a386.tar.gz
llvm-4a280ff48fd6194d5fe06df21b057d30af93a386.tar.bz2
[PCH] Mark a PCH file with a flag to indicate if the serialized AST had
compiler errors or not. -Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time. By default, such a PCH file will be rejected with an error when trying to load it. [libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors occurred. -Have libclang API calls accept a PCH that had compiler errors. The general idea is that we want libclang to stay functional even if a PCH had a compiler error. rdar://10976363. llvm-svn: 152192
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 4bc6dad..f687ccb 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -268,6 +268,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
CI.getPreprocessorOpts().ImplicitPCHInclude,
CI.getPreprocessorOpts().DisablePCHValidation,
CI.getPreprocessorOpts().DisableStatCache,
+ CI.getPreprocessorOpts().AllowPCHWithCompilerErrors,
DeserialListener);
if (!CI.getASTContext().getExternalSource())
goto failure;