This is an archive of the discontinued LLVM Phabricator instance.

Remove custom path manipulation functions from FileSpec
ClosedPublic

Authored by labath on May 10 2018, 3:56 AM.

Details

Summary

now that llvm supports host-agnostic path manipulation functions (and
most of their kinks have been ironed out), we can remove our copies of
the path parsing functions in favour of the llvm ones.

This should be NFC except for the slight difference in handling of the
"" path, which is now normalized to "/" (this only applies to the
literal "
" path; "//net" and friends still get to keep the two
slashes).

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.May 10 2018, 3:56 AM
clayborg added inline comments.May 10 2018, 10:02 AM
source/Utility/FileSpec.cpp
277–281 ↗(On Diff #146110)

Does this work ok in LLVM if the slashes have already been switched on line 275? We would specify a syntax of windows, but the slashes would be wrong?

labath added inline comments.May 10 2018, 10:05 AM
source/Utility/FileSpec.cpp
277–281 ↗(On Diff #146110)

That's not a problem. in the windows path style, the llvm functions treat both kinds of slashes as directory separators.

clayborg accepted this revision.May 10 2018, 10:09 AM
This revision is now accepted and ready to land.May 10 2018, 10:09 AM
This revision was automatically updated to reflect the committed changes.