This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Avoid intermediate string objects for substrings in windows operator/=
ClosedPublic

Authored by mstorsjo on Mar 11 2021, 4:09 AM.

Details

Summary

Check that appends with a path object doesn't do allocations, even
on windows.

Suggested by Marek in D98398. The patch might apply without D98398
(depending on how much of the diff context has to match), but doesn't
make much sense until after that patch has landed.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Mar 11 2021, 4:09 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2021, 4:09 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Quuxplusone added a subscriber: Quuxplusone.

I think this makes plenty of sense to land before D98412!

curdeius accepted this revision.Mar 11 2021, 7:30 AM
curdeius added a subscriber: curdeius.

LGTM.

This revision is now accepted and ready to land.Mar 11 2021, 7:30 AM

Sorry, I forgot to amend out the bit about this not making sense without/before the other one...