[clang] [clang-tools-extra] [clang][modules] Remove `Module::ASTFile` (PR #185994)
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 17 10:08:28 PDT 2026
================
@@ -3500,17 +3501,23 @@ ASTReader::ReadControlBlock(ModuleFile &F,
if (!IsImportingStdCXXModule) {
StoredSize = (off_t)Record[Idx++];
StoredModTime = (time_t)Record[Idx++];
+ ModuleCacheLen = (unsigned)Record[Idx++];
StringRef SignatureBytes = Blob.substr(0, ASTFileSignature::size);
StoredSignature = ASTFileSignature::create(SignatureBytes.begin(),
SignatureBytes.end());
Blob = Blob.substr(ASTFileSignature::size);
- // Use BaseDirectoryAsWritten to ensure we use the same path in the
- // ModuleCache as when writing.
- StoredFile = ReadPathBlob(BaseDirectoryAsWritten, Record, Idx, Blob);
+ StoredFile = ReadStringBlob(Record, Idx, Blob);
if (ImportedFile.empty()) {
- ImportedFile = StoredFile;
+ if (ImportedKind == MK_ImplicitModule) {
+ assert(ModuleCacheLen != 0);
----------------
benlangmuir wrote:
Is module cache always absolute or would zero be valid if it was the current directory?
https://github.com/llvm/llvm-project/pull/185994
More information about the cfe-commits
mailing list