[PATCH] D95279: Support: Remove duplicated code in {File,clang::ModulesDependency}Collector, NFC
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 22 17:28:50 PST 2021
dexonsmith created this revision.
dexonsmith added reviewers: dblaikie, JDevlieghere.
Herald added subscribers: ributzka, hiraditya.
dexonsmith requested review of this revision.
Herald added projects: clang, LLVM.
Refactor the duplicated canonicalize-path logic in `FileCollector` and
`ModulesDependencyCollector` into a new utility called
`PathCanonicalizer` that's shared. This popped up when tracking down a
bug common to both in https://reviews.llvm.org/D95202.
As drive-bys, update a few names and comments to better reflect the
effect of the code, delay removal of `..`s to avoid an unnecessary extra
string copy, and leave behind a couple of FIXMEs for future
consideration.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95279
Files:
clang/include/clang/Frontend/Utils.h
clang/lib/Frontend/ModuleDependencyCollector.cpp
llvm/include/llvm/Support/FileCollector.h
llvm/lib/Support/FileCollector.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95279.318701.patch
Type: text/x-patch
Size: 10905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210123/4ea6005b/attachment-0001.bin>
More information about the cfe-commits
mailing list