This is an archive of the discontinued LLVM Phabricator instance.

Consolidate string types into ptr and length representations.
ClosedPublic

Authored by saugustine on Jul 20 2021, 10:32 AM.

Details

Summary

After rGbbbc4f110e35ac709b943efaa1c4c99ec073da30, we can move
any string type that has convenient pointer and length fields
into the PtrAndLengthKind, reducing the amount of code.

Diff Detail

Event Timeline

saugustine created this revision.Jul 20 2021, 10:32 AM
saugustine requested review of this revision.Jul 20 2021, 10:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2021, 10:32 AM
dblaikie accepted this revision.Jul 20 2021, 10:46 AM

Looks good, with the StdStringKind case reverted/kept separately given its use in toNullTerminatedStringRef.

Thanks!

llvm/lib/Support/Twine.cpp
33

Ah, this feature might justify keeping StdStringKind separately.

This revision is now accepted and ready to land.Jul 20 2021, 10:46 AM
This revision was landed with ongoing or failed builds.Jul 20 2021, 1:30 PM
This revision was automatically updated to reflect the committed changes.