================
@@ -3311,12 +3314,11 @@ ASTReader::ReadControlBlock(ModuleFile &F,
SignatureBytes.end());
Blob = Blob.substr(ASTFileSignature::size);
- if (ImportedFile.empty()) {
- // Use BaseDirectoryAsWritten to ensure we use the same path in the
- // ModuleCache as when writing.
- ImportedFile =
- ReadPathBlob(BaseDirectoryAsWritten, Record, Idx, Blob);
- }
+ // Use BaseDirectoryAsWritten to ensure we use the same path in the
+ // ModuleCache as when writing.
+ StoredFile = ReadPathBlob(BaseDirectoryAsWritten, Record, Idx, Blob);
----------------
vsapsai wrote:
Looks like we are writing the path blob unconditionally
https://github.com/llvm/llvm-project/blob/7810d8484413ae64029c93f8dfc43f77b0ba98c3/clang/lib/Serialization/ASTWriter.cpp#L1610
So it should be OK to read it unconditionally too.
https://github.com/llvm/llvm-project/pull/136612
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits