diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-07 01:51:17 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-07 01:51:17 +0000 |
commit | 4a280ff48fd6194d5fe06df21b057d30af93a386 (patch) | |
tree | 2a904ffe7ce2cd1dcf1214b18eccd09cbe3ea5ab /clang/tools/libclang/Indexing.cpp | |
parent | 9b2ab81a0c37d1adbf7924823ac923045a543eed (diff) | |
download | bcm5719-llvm-4a280ff48fd6194d5fe06df21b057d30af93a386.tar.gz bcm5719-llvm-4a280ff48fd6194d5fe06df21b057d30af93a386.zip |
[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/tools/libclang/Indexing.cpp')
-rw-r--r-- | clang/tools/libclang/Indexing.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index 1475859e335..aad6e02fe98 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -369,6 +369,7 @@ static void clang_indexSourceFile_Impl(void *UserData) { bool CacheCodeCompletionResults = false; PreprocessorOptions &PPOpts = CInvok->getPreprocessorOpts(); PPOpts.DetailedRecord = false; + PPOpts.AllowPCHWithCompilerErrors = true; if (requestedToGetTU) { OnlyLocalDecls = CXXIdx->getOnlyLocalDecls(); |