mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Dependency Scanning] Key into a global (shared) dependency scanning cache via context hash
Introduces a concept of a dependency scanning action context hash, which is used to select an instance of a global dependency scanning cache which gets re-used across dependency scanning actions.
This commit is contained in:
@@ -35,9 +35,8 @@ using llvm::BCRecordLayout;
|
||||
using llvm::BCVBR;
|
||||
|
||||
/// Every .moddepcache file begins with these 4 bytes, for easy identification.
|
||||
const unsigned char MODULE_DEPENDENCY_CACHE_FORMAT_SIGNATURE[] = {'I', 'M', 'D',
|
||||
'C'};
|
||||
const unsigned MODULE_DEPENDENCY_CACHE_FORMAT_VERSION_MAJOR = 2;
|
||||
const unsigned char MODULE_DEPENDENCY_CACHE_FORMAT_SIGNATURE[] = {'I', 'M', 'D','C'};
|
||||
const unsigned MODULE_DEPENDENCY_CACHE_FORMAT_VERSION_MAJOR = 3;
|
||||
/// Increment this on every change.
|
||||
const unsigned MODULE_DEPENDENCY_CACHE_FORMAT_VERSION_MINOR = 0;
|
||||
|
||||
@@ -56,7 +55,7 @@ using IdentifierIDArryField = llvm::BCArray<IdentifierIDField>;
|
||||
|
||||
/// Identifiers used to refer to the above arrays
|
||||
using FileIDArrayIDField = IdentifierIDField;
|
||||
using TripleIDField = IdentifierIDField;
|
||||
using ContextHashIDField = IdentifierIDField;
|
||||
using DependencyIDArrayIDField = IdentifierIDField;
|
||||
using FlagIDArrayIDField = IdentifierIDField;
|
||||
|
||||
@@ -118,7 +117,7 @@ using IdentifierArrayLayout =
|
||||
using ModuleInfoLayout =
|
||||
BCRecordLayout<MODULE_NODE, // ID
|
||||
IdentifierIDField, // module name
|
||||
TripleIDField, // target triple
|
||||
ContextHashIDField, //
|
||||
DependencyIDArrayIDField // directDependencies
|
||||
>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user