[PATCH] D156749: [modules] Fix error about the same module being defined in different .pcm files when using VFS overlays.

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 21:55:33 PDT 2023


jansvoboda11 added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriter.cpp:1330
     AddPath(WritingModule->PresumedModuleMapFile.empty()
-                ? Map.getModuleMapFileForUniquing(WritingModule)->getName()
+                ? Map.getModuleMapFileForUniquing(WritingModule)
+                      ->getNameAsRequested()
----------------
vsapsai wrote:
> jansvoboda11 wrote:
> > Can we canonicalize this also? It'd be useful in the scanner.
> I'm not sure about that. ASTReader has some complicated logic around reading this value https://github.com/llvm/llvm-project/blob/c1803d5366c794ecade4e4ccd0013690a1976d49/clang/lib/Serialization/ASTReader.cpp#L4005 So if we don't have a proven need for it with a test case, I wouldn't change it.
Good point. I do have a use for it, but I think it'd be safer to do separately from this patch a qualify it in isolation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156749



More information about the cfe-commits mailing list