Page MenuHomePhabricator

Define sys::path::convert_to_slash.
ClosedPublic

Authored by ruiu on Jan 6 2017, 10:42 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu updated this revision to Diff 83516.Jan 6 2017, 10:42 PM
ruiu retitled this revision from to Define sys::path::convert_to_slash..
ruiu updated this object.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.
silvas accepted this revision.Jan 7 2017, 7:55 PM
silvas added a reviewer: silvas.
silvas added a subscriber: silvas.

can you put the declaration/definition closer to sys::path::native? Other than that this LGTM.

This revision is now accepted and ready to land.Jan 7 2017, 7:55 PM
ruiu added a comment.Jan 8 2017, 5:17 PM

Sean,

I'm reluctant to change this type from std::string convert_to_slashes(StringRef) to void convert_to_slashes(SmallVectorImpl<char> &) as the former is easier to use than the latter. In some cases, you can avoid string copy with the latter type, but I think that's very important here. I don't want to optimize unless it is needed.

silvas added a comment.Jan 8 2017, 5:37 PM
In D28444#639425, @ruiu wrote:

Sean,

I'm reluctant to change this type from std::string convert_to_slashes(StringRef) to void convert_to_slashes(SmallVectorImpl<char> &) as the former is easier to use than the latter. In some cases, you can avoid string copy with the latter type, but I think that's very important here. I don't want to optimize unless it is needed.

Sorry for the confusion, I didn't mean to change the signature. By "put the declaration/definition closer" I literally just meant to move the lines of code within the file so that they are nearby.

This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Jan 8 2017, 5:59 PM

Ah. I made that change and submitted as r291414. Thanks.