================
@@ -739,6 +795,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module 
*M) {
   MDC.ScanInstance.getASTReader()->visitInputFileInfos(
       *MF, /*IncludeSystem=*/true,
       [&](const serialization::InputFileInfo &IFI, bool IsSystem) {
+        if (MD.IsShareable) {
+          auto FullFilePath = ASTReader::ResolveImportedPath(
+              PathBuf, IFI.UnresolvedImportedFilename, MF->BaseDirectory);
+          MD.IsShareable = isPathInSharedDir(SharedDirs, *FullFilePath);
+          PathBuf.resize_for_overwrite(256);
----------------
benlangmuir wrote:

Why are you resizing the string here? `ResolveImportedPath` will `clear()` it 
before using it anyway.

https://github.com/llvm/llvm-project/pull/130634
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to