llvm-project/clang/lib/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
..
Rewrite [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
ASTConsumers.cpp [clang][NFC] Store a pointer to the ASTContext in ASTDumper and TextNodeDumper 2020-07-03 13:59:22 +01:00
ASTMerge.cpp
ASTUnit.cpp [CodeComplete] Basic code completion for attribute names. 2021-08-12 23:49:10 +02:00
CMakeLists.txt Revert "[Clang] Move assembler into a separate file" 2021-01-23 15:04:27 +01:00
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp [ASTReader] Allow controlling separately whether validation should be disabled for a PCH vs a module file 2021-01-21 20:45:54 -08:00
CompilerInstance.cpp [clang] Remove redundant calls to c_str() (NFC) 2021-08-31 08:53:51 -07:00
CompilerInvocation.cpp [modules] Use `HashBuilder` and `MD5` for the module hash. 2021-09-03 11:13:36 -07:00
CreateInvocationFromCommandLine.cpp [clangd] Avoid "expected one compiler job" by picking the first eligible job. 2021-08-13 00:36:30 +02:00
DependencyFile.cpp [clang] In DependencyCollector on Windows, ignore case and separators when discarding duplicate dependency file paths. 2021-05-17 10:32:52 -04:00
DependencyGraph.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
DiagnosticRenderer.cpp [clang][Frontend] Fix a crash in DiagnosticRenderer. 2021-02-17 09:02:49 +01:00
FrontendAction.cpp [clang][modules] Build inferred modules 2021-05-17 10:40:51 +02:00
FrontendActions.cpp Frontend: Respect -fno-temp-file when creating a PCH 2021-06-17 18:34:10 -07:00
FrontendOptions.cpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
HeaderIncludeGen.cpp Add flag for showing skipped headers in -H / --show-includes output 2021-04-14 17:01:51 +02:00
InitHeaderSearch.cpp [clang] NFC: Replace std::pair by a struct in InitHeaderSearch 2021-05-28 14:06:25 +02:00
InitPreprocessor.cpp Revert "[CLANG][PATCH][FPEnv] Add support for option -ffp-eval-method and extend #pragma float_control similarly" 2021-09-01 04:48:50 -07:00
InterfaceStubFunctionsConsumer.cpp [ifs] Prepare llvm-ifs for elfabi/ifs merging. 2021-07-19 11:23:00 -07:00
LayoutOverrideSource.cpp
LogDiagnosticPrinter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ModuleDependencyCollector.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
MultiplexConsumer.cpp [AST] Add missing MultiplexConsumer::CompleteExternalDeclaration 2019-12-22 19:00:48 -08:00
PrecompiledPreamble.cpp [clang][clangd] Avoid inconsistent target creation 2021-04-06 23:23:34 +08:00
PrintPreprocessedOutput.cpp [Preprocessor] Elide empty line(s) at start of file. 2021-08-25 12:48:59 -05:00
SerializedDiagnosticPrinter.cpp CrashTracer: clang at clang: llvm::BitstreamWriter::ExitBlock 2020-07-09 20:27:33 -07:00
SerializedDiagnosticReader.cpp
TestModuleFileExtension.cpp [modules] Use `HashBuilder` and `MD5` for the module hash. 2021-09-03 11:13:36 -07:00
TestModuleFileExtension.h [modules] Use `HashBuilder` and `MD5` for the module hash. 2021-09-03 11:13:36 -07:00
TextDiagnostic.cpp [clang-cl] Remove the /fallback option 2021-02-04 10:33:16 +01:00
TextDiagnosticBuffer.cpp Fix more implicit conversions. Getting closer to having clang working with gcc 5 again 2020-01-29 02:57:59 +01:00
TextDiagnosticPrinter.cpp [clang-cl] Remove the /fallback option 2021-02-04 10:33:16 +01:00
VerifyDiagnosticConsumer.cpp Frontend: Migrate to FileEntryRef in VerifyDiagnosticConsumer.cpp, NFC 2020-12-09 11:51:43 -08:00