This is an archive of the discontinued LLVM Phabricator instance.

[WIP][FileCollector] isCaseSensitivePath
AbandonedPublic

Authored by jkorous on Apr 27 2020, 12:51 PM.

Details

Reviewers
JDevlieghere

Diff Detail

Event Timeline

jkorous created this revision.Apr 27 2020, 12:51 PM
JDevlieghere added inline comments.Apr 27 2020, 1:51 PM
llvm/lib/Support/FileCollector.cpp
29

Yes, optimally we should compare the realpath of Path.lower() with the realpath of Path.u[per(), but realpath is an expensive operation, so this seems like a reasonable enough heuristic.

182

I'm not sure I fully understand your point so apologies if my answer doesn't actually address your question. The case-sensitivity is used by the RedirectingFileSystem for lookups. It ensures that /foo/bar and /foo/Bar resolve to the same file as would be the case on the real file system. You need the deduplication in the mapping because if you are traversing the directory with a recursive directory iterator, you want both /foo/Bar/baz and /foo/bar/quux to show up under /foo/bar and /foo/Bar.

jkorous abandoned this revision.Apr 30 2020, 1:58 PM

I got convinced in an offline discussion that the rewards aren't greater than risks here.