llvm-project/clang/lib/Serialization
Duncan P. N. Exon Smith 60fa28882e Modules: Use hash of PCM content for SIGNATURE
Change ASTFileSignature from a random 32-bit number to the hash of the
PCM content.

  - Move definition ASTFileSignature to Basic/Module.h so Module and
    ASTSourceDescriptor can use it.

  - Change the signature from uint64_t to std::array<uint32_t,5>.

  - Stop using (saving/reading) the size and modification time of PCM
    files when there is a valid SIGNATURE.

  - Add UNHASHED_CONTROL_BLOCK, and use it to store the SIGNATURE record
    and other records that shouldn't affect the hash.  Because implicit
    modules reuses the same file for multiple levels of -Werror, this
    includes DIAGNOSTIC_OPTIONS and DIAG_PRAGMA_MAPPINGS.

This helps to solve a PCH + implicit Modules dependency issue: PCH files
are handled by the external build system, whereas implicit modules are
handled by internal compiler build system.  This prevents invalidating a
PCH when the compiler overwrites a PCM file with the same content
(modulo the diagnostic differences).

Design and original patch by Manman Ren!

llvm-svn: 297655
2017-03-13 18:45:08 +00:00
..
ASTCommon.cpp Add an explicit derived class of FunctionDecl to model deduction guides rather 2017-02-17 20:05:37 +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 Modules: Use hash of PCM content for SIGNATURE 2017-03-13 18:45:08 +00:00
ASTReaderDecl.cpp Take into account C++17's noexcept function types during merging -- it should 2017-03-08 23:00:26 +00:00
ASTReaderInternals.h Remove move constructors that are identical to the generated default move ctor. 2016-10-21 18:55:07 +00:00
ASTReaderStmt.cpp [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt. 2017-03-06 23:38:15 +00:00
ASTWriter.cpp Modules: Use hash of PCM content for SIGNATURE 2017-03-13 18:45:08 +00:00
ASTWriterDecl.cpp [AST/ObjC] Make ObjCCategoryImplDecl consistent with ObjCCategoryDecl and use the category name as its DeclName 2017-03-07 09:26:07 +00:00
ASTWriterStmt.cpp [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt. 2017-03-06 23:38:15 +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 Modules: Use hash of PCM content for SIGNATURE 2017-03-13 18:45:08 +00:00
GlobalModuleIndex.cpp Modules: Use hash of PCM content for SIGNATURE 2017-03-13 18:45:08 +00:00
Module.cpp Modules: Simplify the ModuleFile constructor; likely NFC 2017-01-29 00:39:09 +00:00
ModuleFileExtension.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleManager.cpp [modules] Load the ModuleOffsetMap from the module header lazily. 2017-02-18 00:32:02 +00:00
MultiOnDiskHashTable.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00