summaryrefslogtreecommitdiff
path: root/test/Modules/rebuild.m
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Use hash of PCM content for SIGNATUREDuncan P. N. Exon Smith2017-03-131-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297655 91177308-0d34-0410-b5e6-96231b3b80d8
* [modules] Simplify -cc1 interface for enabling implicit module maps.Richard Smith2015-06-161-6/+6
| | | | | | | | | | | | | | We used to have a flag to enable module maps, and two more flags to enable implicit module maps. This is all redundant; we don't need any flag for enabling module maps in the abstract, and we don't usually have -fno- flags for -cc1. We now have just a single flag, -fimplicit-module-maps, that enables implicitly searching the file system for module map files and loading them. The driver interface is unchanged for now. We should probably rename -fmodule-maps to -fimplicit-module-maps at some point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239789 91177308-0d34-0410-b5e6-96231b3b80d8
* Check module signature when the module has already been loadedBen Langmuir2014-11-081-0/+17
| | | | | | | | | | We may need to verify the signature on subsequent imports as well, just like we verify the size/modtime: @import A; @import B; // imports A @import C; // imports A git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221569 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Modules: Remove "REQUIRES:shell" since they work for me.NAKAMURA Takumi2014-11-041-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221261 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a "signature" to AST files to verify that they haven't changedBen Langmuir2014-10-231-0/+29
Since the order of the IDs in the AST file (e.g. DeclIDs, SelectorIDs) is not stable, it is not safe to load an AST file that depends on another AST file that has been rebuilt since the importer was built, even if "nothing changed". We previously used size and modtime to check this, but I've seen cases where a module rebuilt quickly enough to foil this check and caused very hard to debug build errors. To save cycles when we're loading the AST, we just generate a random nonce value and check that it hasn't changed when we load an imported module, rather than actually hash the whole file. This is slightly complicated by the fact that we need to verify the signature inside addModule, since we might otherwise consider that a mdoule is "OutOfDate" when really it is the importer that is out of date. I didn't see any regressions in module load time after this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220493 91177308-0d34-0410-b5e6-96231b3b80d8