[PATCH] D135841: [clang][deps][lex] Avoid canonicalization of remapped framework directories
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 12 18:38:43 PDT 2022
jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, benlangmuir, bnbarham.
Herald added a subscriber: ributzka.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
In D134923 <https://reviews.llvm.org/D134923>, the scanner introduced canonicalization of framework directories when reporting module map paths in order to increase module sharing. However, if we canonicalize framework directory that plays a role in a VFS remapping, and later try to use that module map to build the module, header lookup can fail. This happens when the module headers are remapped using the original framework path.
This patch fixes that. The implementation relies on the fact that the chain of directories in VFS remapping are assigned `DirectoryEntry` objects distinct from their on-disk counterparts. If we detect that case, we avoid the canonicalization.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135841
Files:
clang/lib/Lex/ModuleMap.cpp
clang/test/ClangScanDeps/modules-symlink-dir-vfs.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135841.467339.patch
Type: text/x-patch
Size: 4029 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221013/295e65fc/attachment.bin>
More information about the cfe-commits
mailing list