mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Caching] Use clang to prefix-map -fmodule-file-cache-key paths
When prefix mapping paths that are used in clang, ensure we are consistently using the same prefix mapper from clang. This prevents mismatches that could cause modules to fail to load. rdar://123324072
This commit is contained in:
@@ -39,7 +39,8 @@ 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 = 5; // optionalModuleImports
|
||||
const unsigned MODULE_DEPENDENCY_CACHE_FORMAT_VERSION_MAJOR =
|
||||
6; // mappedPCMPath
|
||||
/// Increment this on every change.
|
||||
const unsigned MODULE_DEPENDENCY_CACHE_FORMAT_VERSION_MINOR = 1;
|
||||
|
||||
@@ -182,6 +183,7 @@ using SwiftPlaceholderModuleDetailsLayout =
|
||||
using ClangModuleDetailsLayout =
|
||||
BCRecordLayout<CLANG_MODULE_DETAILS_NODE, // ID
|
||||
FileIDField, // pcmOutputPath
|
||||
FileIDField, // mappedPCMPath
|
||||
FileIDField, // moduleMapPath
|
||||
ContextHashIDField, // contextHash
|
||||
FlagIDArrayIDField, // commandLine
|
||||
|
||||
Reference in New Issue
Block a user