This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms
ClosedPublic

Authored by mstorsjo on Feb 25 2021, 4:19 AM.

Details

Summary

This avoids having to query pathconf for a max size for preallocating a buffer for the return value.

This is an extension to the POSIX getcwd() spec.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Feb 25 2021, 4:19 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2021, 4:19 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
ldionne accepted this revision.Feb 25 2021, 11:18 AM
ldionne added a subscriber: ldionne.

LGTM pending CI.

This revision is now accepted and ready to land.Feb 25 2021, 11:18 AM