================
@@ -1815,6 +1815,97 @@ llvm::Error ASTReader::ReadSourceManagerBlock(ModuleFile
&F) {
}
}
+const ASTReader::PrimaryLoadedFileLoc *
+ASTReader::getPrimaryLoadedFile(const SLocFileIdentity &Id) const {
+ assert(!Id.Name.empty() && "querying a non-file entry");
+ auto It = PrimaryLoadedFiles.find(Id.Name);
+ if (It == PrimaryLoadedFiles.end())
+ return nullptr;
+ const PrimaryLoadedFileLoc &Primary = It->second;
+ // A matching name but different size or time is a different file, e.g. two
+ // modules built against different versions of the same path. Don't merge.
+ if (Primary.Size != Id.Size || Primary.Time != Id.Time)
----------------
jansvoboda11 wrote:
The size+mtime of input files is already baked into Clang's PCMs by default,
but can be (mostly?) disabled through command-line options I believe.
What I'd like to know is if we're okay with not deduplicating the input files
due the names not matching exactly (i.e. capitalization, path separators,
absolute/relative mismatch, benign path components differences, etc.).
https://github.com/llvm/llvm-project/pull/209795
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits