This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFCI] Remove use of ConstString from UnixSignals::SignalCode
ClosedPublic

Authored by bulbazord on May 25 2023, 4:30 PM.

Details

Summary

On llvm.org and all downstream forks that I'm aware of, SignalCodes are
always created from C string literals. They are never compared to
anything so they take up space in the ConstString StringPool for no
tangible benefit.

I've changed the type here to const llvm::StringLiteral instead of
using a StringRef or a const char * to express intent -- These
strings come from constant data whose lifetime is directly tied to that
of the running process (and are thus safe to store).

Diff Detail

Event Timeline

bulbazord created this revision.May 25 2023, 4:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 4:30 PM
bulbazord requested review of this revision.May 25 2023, 4:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 4:30 PM
This revision is now accepted and ready to land.May 26 2023, 8:51 AM