]> granicus.if.org Git - clang/commit
[PCH] Mark a PCH file with a flag to indicate if the serialized AST had
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 7 Mar 2012 01:51:17 +0000 (01:51 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 7 Mar 2012 01:51:17 +0000 (01:51 +0000)
commitbef35c91b594f66216f4aab303b71a6c5ab7abcf
treeaf935f170855c48b0417e6c0522da55e9a2873c0
parent4a90e1a8a296c30e94e34e19974d84fb8cfc2bd3
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152192 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/Basic/DiagnosticSerializationKinds.td
include/clang/Frontend/ASTUnit.h
include/clang/Frontend/CompilerInstance.h
include/clang/Frontend/PreprocessorOptions.h
include/clang/Serialization/ASTReader.h
include/clang/Serialization/ASTWriter.h
lib/Frontend/ASTUnit.cpp
lib/Frontend/CompilerInstance.cpp
lib/Frontend/FrontendAction.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/Index/pch-with-errors.c [new file with mode: 0644]
test/Index/werror.c
tools/libclang/CIndex.cpp
tools/libclang/Indexing.cpp