This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Add __small_buffer
ClosedPublic

Authored by philnik on Dec 17 2022, 4:46 AM.

Details

Reviewers
EricWF
ldionne
Group Reviewers
Restricted Project
Commits
rGa3490920615e: [libc++] Add __small_buffer
Summary

This is an implementation detail for move_only_function (and potentially other type-erasing classes).

Diff Detail

Event Timeline

philnik created this revision.Dec 17 2022, 4:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2022, 4:46 AM
philnik requested review of this revision.Dec 17 2022, 4:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2022, 4:46 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
EricWF requested changes to this revision.Dec 17 2022, 11:50 AM
EricWF added a subscriber: EricWF.

Why?

Changes need descriptions.

This revision now requires changes to proceed.Dec 17 2022, 11:50 AM
philnik edited the summary of this revision. (Show Details)Dec 18 2022, 4:39 AM
philnik updated this revision to Diff 483847.Dec 18 2022, 3:11 PM

Generate files

philnik updated this revision to Diff 483890.Dec 19 2022, 2:46 AM

Try to fix CI

ldionne accepted this revision.Dec 19 2022, 11:21 AM
ldionne added a subscriber: ldionne.
ldionne added inline comments.
libcxx/include/__utility/small_buffer.h
26–29
39–44

This avoids instantiating a lambda and it's pretty easy to do, so we might as well.

46–53

I think the = default ones should be _LIBCPP_HIDE_FROM_ABI, since they *are* generated at the end of the day.

I mainly glossed over it to see what it does.

libcxx/include/__utility/small_buffer.h
36

Small nit, since this is C++23, this could be a requires instead of a static_assert.

philnik updated this revision to Diff 487176.Jan 8 2023, 5:40 AM
philnik marked 4 inline comments as done.

Address comments

philnik updated this revision to Diff 501168.Feb 28 2023, 9:04 AM
  • Rebased
  • Try to fix CI
This revision was not accepted when it landed; it landed in state Needs Review.Oct 26 2023, 8:26 AM
This revision was automatically updated to reflect the committed changes.