This is an archive of the discontinued LLVM Phabricator instance.

[libc++] inline more functions into basic_string
ClosedPublic

Authored by philnik on Oct 29 2022, 12:05 PM.

Details

Reviewers
ldionne
EricWF
Group Reviewers
Restricted Project
Commits
rG777f03479941: [libc++] inline more functions into basic_string
Summary

This removes a lot of boilerplate.

Diff Detail

Event Timeline

philnik created this revision.Oct 29 2022, 12:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2022, 12:05 PM
philnik requested review of this revision.Oct 29 2022, 12:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2022, 12:05 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Nov 3 2022, 9:13 AM

Can you run benchmarks for string before and after just to be sure? It shouldn't change anything since the functions were inline before and they still are implicitly inline, but who knows.

This revision is now accepted and ready to land.Nov 3 2022, 9:13 AM
EricWF requested changes to this revision.Nov 3 2022, 9:33 AM
EricWF added a subscriber: EricWF.

This also affects external instantiations. So I'm not sure this is as simple as just "removing boilerplate".

Have you considered this?

This revision now requires changes to proceed.Nov 3 2022, 9:33 AM
EricWF accepted this revision.Nov 3 2022, 9:34 AM

Disregard me. They were all marked inline already.

Though I must say, I prefer out-of-line definitions for big classes because it makes it easier to inspect the class and see we provide the correct declarations.

This revision is now accepted and ready to land.Nov 3 2022, 9:34 AM
This revision was automatically updated to reflect the committed changes.