[Lldb-commits] [PATCH] D159011: [lldb][NFCI] Remove use of ConstString from UnixSignals
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 28 12:15:49 PDT 2023
bulbazord created this revision.
bulbazord added reviewers: JDevlieghere, mib, fdeazeve, DavidSpickett.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
The majority of UnixSignals strings are static in the sense that they do
not change. The overwhelming majority of these strings are string
literals. Using ConstString to manage their lifetime does not make
sense. The only exception to this is one of the subclasses of
UnixSignals, for which I have created a StringSet local to that file
which will guarantee the lifetimes of these StringRefs.
As for the other benefits of ConstString, string uniqueness is not a
concern (as many of them are already string literals) and comparing
signal names and aliases should not be a hot path.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D159011
Files:
lldb/include/lldb/Target/UnixSignals.h
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Target/UnixSignals.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159011.554012.patch
Type: text/x-patch
Size: 7484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230828/ec3851b1/attachment.bin>
More information about the lldb-commits
mailing list