llvm-project/clang/lib/Serialization
Yaxun Liu 43712e05ea Do not validate pch when -fno-validate-pch is set
There is a bug causing pch to be validated even though -fno-validate-pch is set. This patch fixes it.

ASTReader relies on ASTReaderListener to initialize SuggestedPredefines, which is required for compilations using PCH. Before this change, PCHValidator is the default ASTReaderListener. After this change, when -fno-validate-pch is set, PCHValidator is disabled, but we need a replacement ASTReaderListener to initialize SuggestedPredefines. Class SimpleASTReaderListener is implemented for this purpose.

This change only affects -fno-validate-pch. There is no functional change if -fno-validate-pch is not set.

If -fno-validate-pch is not set, conflicts in predefined macros between pch and current compiler instance causes error.

If -fno-validate-pch is set, predefine macros in current compiler override those in pch so that compilation can continue.

Differential Revision: https://reviews.llvm.org/D24054

llvm-svn: 280842
2016-09-07 18:40:20 +00:00
..
ASTCommon.cpp P0217R3: Parsing support and framework for AST representation of C++1z 2016-07-22 23:36:59 +00:00
ASTCommon.h PR29097: add an update record when we instantiate the default member 2016-08-24 21:25:37 +00:00
ASTReader.cpp Do not validate pch when -fno-validate-pch is set 2016-09-07 18:40:20 +00:00
ASTReaderDecl.cpp PR29166: when merging declarations with typedef names for linkage purposes, 2016-08-30 19:13:18 +00:00
ASTReaderInternals.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ASTReaderStmt.cpp Revert "[OpenMP] Sema and parsing for 'teams distribute simd’ pragma" 2016-08-18 09:25:07 +00:00
ASTWriter.cpp Lazily load the ContextDecl for a lambda's DefinitionData, to fix a 2016-08-25 00:34:00 +00:00
ASTWriterDecl.cpp P0217R3: serialization/deserialization support for c++17 decomposition declarations. 2016-08-12 02:21:25 +00:00
ASTWriterStmt.cpp Revert "[OpenMP] Sema and parsing for 'teams distribute simd’ pragma" 2016-08-18 09:25:07 +00:00
CMakeLists.txt Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
GeneratePCH.cpp C++ Modules TS: add frontend support for building pcm files from module 2016-08-26 00:14:38 +00:00
GlobalModuleIndex.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
Module.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleFileExtension.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleManager.cpp Clean up handling of reading module files from stdin. Don't bother trying to 2016-09-02 00:18:05 +00:00
MultiOnDiskHashTable.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00