llvm-project/clang/unittests/Frontend
Alexandre Rames 655bea4226 [modules] Use `HashBuilder` and `MD5` for the module hash.
Per the comments, `hash_code` values "are not stable to save or
persist", so are unsuitable for the module hash, which must persist
across compilations for the implicit module hashes to match. Note that
in practice, today, `hash_code` are stable. But this is an
implementation detail, with a clear `FIXME` indicating we should switch
to a per-execution seed.

The stability of `MD5` also allows modules cross-compilation use-cases.
The `size_t` underlying storage for `hash_code` varying across platforms
could cause mismatching hashes when cross-compiling from a 64bit
target to a 32bit target.

Note that native endianness is still used for the hash computation. So hashes
will differ between platforms of different endianness.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D102943
2021-09-03 11:13:36 -07:00
..
ASTUnitTest.cpp [clang][Frontend] Add missing error handling 2020-10-22 14:14:19 -07:00
CMakeLists.txt [clangd] Avoid "expected one compiler job" by picking the first eligible job. 2021-08-13 00:36:30 +02:00
CodeGenActionTest.cpp Move LangStandard*, InputKind::Language to Basic 2019-08-05 13:59:26 +00:00
CompilerInstanceTest.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
CompilerInvocationTest.cpp [modules] Use `HashBuilder` and `MD5` for the module hash. 2021-09-03 11:13:36 -07:00
FixedPointString.cpp
FrontendActionTest.cpp PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
OutputStreamTest.cpp Frontend: Fix memory leak in CompilerInstance::setVerboseOutputStream 2021-01-26 14:57:23 -08:00
PCHPreambleTest.cpp Fix clang unnittest build with GCC 5 2020-01-29 10:30:36 +01:00
ParsedSourceLocationTest.cpp
TextDiagnosticTest.cpp Frontend: Migrate to FileEntryRef in TextDiagnosticTest, NFC 2020-12-11 17:06:28 -08:00
UtilsTest.cpp [clangd] Avoid "expected one compiler job" by picking the first eligible job. 2021-08-13 00:36:30 +02:00