forked from OSchip/llvm-project
43712e05ea
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 |
||
---|---|---|
.. | ||
ASTCommon.cpp | ||
ASTCommon.h | ||
ASTReader.cpp | ||
ASTReaderDecl.cpp | ||
ASTReaderInternals.h | ||
ASTReaderStmt.cpp | ||
ASTWriter.cpp | ||
ASTWriterDecl.cpp | ||
ASTWriterStmt.cpp | ||
CMakeLists.txt | ||
GeneratePCH.cpp | ||
GlobalModuleIndex.cpp | ||
Module.cpp | ||
ModuleFileExtension.cpp | ||
ModuleManager.cpp | ||
MultiOnDiskHashTable.h |