Skip to content

Commit a98fd28

Browse files
committed
🍒 [lldb][NFCI] Remove the non-const reference Mangled::GetMangledName accessor
We've been seen (very sporadic) lifetime issues around this area. We noticed that GetMangledName has two accessors, one of which returns a non-const reference. I audited all the callsites and no users of this overload actually mutate the ConstString itself (which is a suspicious thing to do anyway since it's just a wrapper around a const char*). This patch removes the redundant overload. rdar://161128180
1 parent b8be76c commit a98fd28

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

‎lldb/include/lldb/Core/Mangled.h‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,7 @@ class Mangled {
153153
/// Mangled name get accessor.
154154
///
155155
/// \return
156-
/// A reference to the mangled name string object.
157-
ConstString &GetMangledName() { return m_mangled; }
158-
159-
/// Mangled name get accessor.
160-
///
161-
/// \return
162-
/// A const reference to the mangled name string object.
156+
/// The mangled name string object.
163157
ConstString GetMangledName() const { return m_mangled; }
164158

165159
/// Best name get accessor.

0 commit comments

Comments
 (0)