This revision was automatically updated to reflect the committed changes. Closed by commit rGcee60bbf417d: [lldb] Remove the user-defined copy-ctor in ConstString (authored by JDevlieghere). Herald added a project: LLDB.
Changed prior to commit: https://reviews.llvm.org/D84440?vs=280174&id=280239#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84440/new/ https://reviews.llvm.org/D84440 Files: lldb/include/lldb/Utility/ConstString.h lldb/source/Core/IOHandlerCursesGUI.cpp Index: lldb/source/Core/IOHandlerCursesGUI.cpp =================================================================== --- lldb/source/Core/IOHandlerCursesGUI.cpp +++ lldb/source/Core/IOHandlerCursesGUI.cpp @@ -1189,9 +1189,7 @@ ListenerSP listener_sp( Listener::MakeListener("lldb.IOHandler.curses.Application")); - ConstString broadcaster_class_target(Target::GetStaticBroadcasterClass()); ConstString broadcaster_class_process(Process::GetStaticBroadcasterClass()); - ConstString broadcaster_class_thread(Thread::GetStaticBroadcasterClass()); debugger.EnableForwardEvents(listener_sp); bool update = true; Index: lldb/include/lldb/Utility/ConstString.h =================================================================== --- lldb/include/lldb/Utility/ConstString.h +++ lldb/include/lldb/Utility/ConstString.h @@ -42,15 +42,7 @@ /// Default constructor /// /// Initializes the string to an empty string. - ConstString() : m_string(nullptr) {} - - /// Copy constructor - /// - /// Copies the string value in \a rhs into this object. - /// - /// \param[in] rhs - /// Another string object to copy. - ConstString(const ConstString &rhs) : m_string(rhs.m_string) {} + ConstString() = default; explicit ConstString(const llvm::StringRef &s); @@ -86,12 +78,6 @@ /// from \a cstr. explicit ConstString(const char *cstr, size_t max_cstr_len); - /// Destructor - /// - /// Since constant string values are currently not reference counted, there - /// isn't much to do here. - ~ConstString() = default; - /// C string equality binary predicate function object for ConstString /// objects. struct StringIsEqual { @@ -124,20 +110,6 @@ /// false otherwise. explicit operator bool() const { return !IsEmpty(); } - /// Assignment operator - /// - /// Assigns the string in this object with the value from \a rhs. - /// - /// \param[in] rhs - /// Another string object to copy into this object. - /// - /// \return - /// A const reference to this object. - ConstString operator=(ConstString rhs) { - m_string = rhs.m_string; - return *this; - } - /// Equal to operator /// /// Returns true if this string is equal to the string in \a rhs. This @@ -445,8 +417,7 @@ return s; }; - // Member variables - const char *m_string; + const char *m_string = nullptr; }; /// Stream the string value \a str to the stream \a s
Index: lldb/source/Core/IOHandlerCursesGUI.cpp =================================================================== --- lldb/source/Core/IOHandlerCursesGUI.cpp +++ lldb/source/Core/IOHandlerCursesGUI.cpp @@ -1189,9 +1189,7 @@ ListenerSP listener_sp( Listener::MakeListener("lldb.IOHandler.curses.Application")); - ConstString broadcaster_class_target(Target::GetStaticBroadcasterClass()); ConstString broadcaster_class_process(Process::GetStaticBroadcasterClass()); - ConstString broadcaster_class_thread(Thread::GetStaticBroadcasterClass()); debugger.EnableForwardEvents(listener_sp); bool update = true; Index: lldb/include/lldb/Utility/ConstString.h =================================================================== --- lldb/include/lldb/Utility/ConstString.h +++ lldb/include/lldb/Utility/ConstString.h @@ -42,15 +42,7 @@ /// Default constructor /// /// Initializes the string to an empty string. - ConstString() : m_string(nullptr) {} - - /// Copy constructor - /// - /// Copies the string value in \a rhs into this object. - /// - /// \param[in] rhs - /// Another string object to copy. - ConstString(const ConstString &rhs) : m_string(rhs.m_string) {} + ConstString() = default; explicit ConstString(const llvm::StringRef &s); @@ -86,12 +78,6 @@ /// from \a cstr. explicit ConstString(const char *cstr, size_t max_cstr_len); - /// Destructor - /// - /// Since constant string values are currently not reference counted, there - /// isn't much to do here. - ~ConstString() = default; - /// C string equality binary predicate function object for ConstString /// objects. struct StringIsEqual { @@ -124,20 +110,6 @@ /// false otherwise. explicit operator bool() const { return !IsEmpty(); } - /// Assignment operator - /// - /// Assigns the string in this object with the value from \a rhs. - /// - /// \param[in] rhs - /// Another string object to copy into this object. - /// - /// \return - /// A const reference to this object. - ConstString operator=(ConstString rhs) { - m_string = rhs.m_string; - return *this; - } - /// Equal to operator /// /// Returns true if this string is equal to the string in \a rhs. This @@ -445,8 +417,7 @@ return s; }; - // Member variables - const char *m_string; + const char *m_string = nullptr; }; /// Stream the string value \a str to the stream \a s
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits