History log of /llvm-project/clang/test/Modules/implicit-module-no-timestamp.cpp (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6
# 91c917b1 11-May-2024 Ivan Murashko <ivan.murashko@gmail.com>

[Modules] Enable MS Windows test for implicit-module-no-timestamp.cpp (#91738)

There is a follow-up commit for #90319. The Windows test was disabled in
that commit, but it should pass on this opera

[Modules] Enable MS Windows test for implicit-module-no-timestamp.cpp (#91738)

There is a follow-up commit for #90319. The Windows test was disabled in
that commit, but it should pass on this operating system. Therefore, it
would be beneficial to have it enabled for MS Windows.

show more ...


Revision tags: llvmorg-18.1.5
# 9a9cff15 01-May-2024 Ivan Murashko <ivan.murashko@gmail.com>

[Modules] Process include files changes (#90319)

There were two diffs that introduced some options useful when you build
modules externally and cannot rely on file modification time as the key
for

[Modules] Process include files changes (#90319)

There were two diffs that introduced some options useful when you build
modules externally and cannot rely on file modification time as the key
for detecting input file changes:
- [D67249](https://reviews.llvm.org/D67249) introduced the
`-fmodules-validate-input-files-content` option, which allows the use of
file content hash in addition to the modification time.
- [D141632](https://reviews.llvm.org/D141632) propagated the use of
`-fno-pch-timestamps` with Clang modules.

There is a problem when the size of the input file (header) is not
modified but the content is. In this case, Clang cannot detect the file
change when the `-fno-pch-timestamps` option is used. The
`-fmodules-validate-input-files-content` option should help, but there
is an issue with its application: it's not applied when the modification
time is stored as zero that is the case for `-fno-pch-timestamps`.

The issue can be fixed using the same trick that was applied during the
processing of `ForceCheckCXX20ModulesInputFiles`:
```
// When ForceCheckCXX20ModulesInputFiles and ValidateASTInputFilesContent
// enabled, it is better to check the contents of the inputs. Since we can't
// get correct modified time information for inputs from overriden inputs.
if (HSOpts.ForceCheckCXX20ModulesInputFiles && ValidateASTInputFilesContent &&
F.StandardCXXModule && FileChange.Kind == Change::None)
FileChange = HasInputContentChanged(FileChange);
```
The patch suggests the solution similar to the presented above and
includes a LIT test to verify it.

show more ...