This is an archive of the discontinued LLVM Phabricator instance.

Save some `std::string` allocations/deallocations when formatting attributes (NFC)
ClosedPublic

Authored by chill on Jan 28 2022, 4:25 AM.

Diff Detail

Event Timeline

chill created this revision.Jan 28 2022, 4:25 AM
chill requested review of this revision.Jan 28 2022, 4:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 4:25 AM
MaskRay accepted this revision.Jan 28 2022, 9:19 AM

Thanks! I suspect 'x' may compile to less code than "x" :)

This revision is now accepted and ready to land.Jan 28 2022, 9:19 AM
This revision was landed with ongoing or failed builds.Jan 31 2022, 4:14 AM
This revision was automatically updated to reflect the committed changes.
chill added a comment.Jan 31 2022, 4:21 AM

Thanks! I suspect 'x' may compile to less code than "x" :)

Well, yeah, but operartor+ does not have the needed overloads and while I casually care about heap allocations, I'd like to have a specific reason for loading a char vs. loading the address of a string literal
before bothering to add those overloads :D