[Lldb-commits] [PATCH] D152582: [lldb] Change return type of UnixSignals::GetShortName

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 12 16:44:50 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf687850de877: [lldb] Change return type of UnixSignals::GetShortName (authored by bulbazord).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152582/new/

https://reviews.llvm.org/D152582

Files:
  lldb/include/lldb/Target/UnixSignals.h
  lldb/source/Target/UnixSignals.cpp


Index: lldb/source/Target/UnixSignals.cpp
===================================================================
--- lldb/source/Target/UnixSignals.cpp
+++ lldb/source/Target/UnixSignals.cpp
@@ -195,10 +195,8 @@
   return m_signals.find(signo) != m_signals.end();
 }
 
-ConstString UnixSignals::GetShortName(ConstString name) const {
-  if (name)
-    return ConstString(name.GetStringRef().substr(3)); // Remove "SIG" from name
-  return name;
+llvm::StringRef UnixSignals::GetShortName(llvm::StringRef name) const {
+  return name.substr(3); // Remove "SIG" from name
 }
 
 int32_t UnixSignals::GetSignalNumberFromName(const char *name) const {
Index: lldb/include/lldb/Target/UnixSignals.h
===================================================================
--- lldb/include/lldb/Target/UnixSignals.h
+++ lldb/include/lldb/Target/UnixSignals.h
@@ -77,8 +77,6 @@
 
   int32_t GetSignalAtIndex(int32_t index) const;
 
-  ConstString GetShortName(ConstString name) const;
-
   // We assume that the elements of this object are constant once it is
   // constructed, since a process should never need to add or remove symbols as
   // it runs.  So don't call these functions anywhere but the constructor of
@@ -147,6 +145,8 @@
     void Reset(bool reset_stop, bool reset_notify, bool reset_suppress);
   };
 
+  llvm::StringRef GetShortName(llvm::StringRef name) const;
+
   virtual void Reset();
 
   typedef std::map<int32_t, Signal> collection;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152582.530708.patch
Type: text/x-patch
Size: 1444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230612/c9b07d25/attachment.bin>


More information about the lldb-commits mailing list