[all-commits] [llvm/llvm-project] 2f377c: [lldb][NFCI] Remove use of ConstString from UnixSi...
Alex Langford via All-commits
all-commits at lists.llvm.org
Thu Sep 14 10:21:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2f377c5bd713e9ee72faa6a99088bb81358059e3
https://github.com/llvm/llvm-project/commit/2f377c5bd713e9ee72faa6a99088bb81358059e3
Author: Alex Langford <alangford at apple.com>
Date: 2023-09-14 (Thu, 14 Sep 2023)
Changed paths:
M lldb/include/lldb/Target/UnixSignals.h
M lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
M lldb/source/Target/UnixSignals.cpp
Log Message:
-----------
[lldb][NFCI] Remove use of ConstString from UnixSignals
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.
Differential Revision: https://reviews.llvm.org/D159011
More information about the All-commits
mailing list