vsapsai added a comment.

In D156749#4561803 <https://reviews.llvm.org/D156749#4561803>, @jansvoboda11 
wrote:

> My suggestion is to use the actual real on-disk path. Not 
> `FileEntryRef::getName()`, but something that always behaves as if 
> `use-external-name` was set to `true`. I believe this would handle your 
> VFS/VFS-use-external-name-true/VFS-use-external-name-false problem. It would 
> also handle another pitfall: two compilations with distinct VFS overlays that 
> redirect two different as-requested module map paths into the same on-disk 
> path.

Do you suggest doing it for the hashing or for ASTWriter or both? We are 
already doing some module map path canonicalization (added a comment in 
corresponding place) but it's not pure on-disk path, it takes into account VFS.



================
Comment at: clang/lib/Lex/HeaderSearch.cpp:259-260
     // to lower-case in case we're on a case-insensitive file system.
     SmallString<128> CanonicalPath(ModuleMapPath);
     if (getModuleMap().canonicalizeModuleMapPath(CanonicalPath))
       return {};
----------------
Sort of canonicalization and obtaining real on-disk path we are doing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156749/new/

https://reviews.llvm.org/D156749

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to