Skip to content

Commit f33564b

Browse files
authored
[lldb][NFCI] Remove the non-const reference Mangled::GetMangledName accessor (llvm#161495)
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 7ae3eca commit f33564b

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
@@ -148,13 +148,7 @@ class Mangled {
148148
/// Mangled name get accessor.
149149
///
150150
/// \return
151-
/// A reference to the mangled name string object.
152-
ConstString &GetMangledName() { return m_mangled; }
153-
154-
/// Mangled name get accessor.
155-
///
156-
/// \return
157-
/// A const reference to the mangled name string object.
151+
/// The mangled name string object.
158152
ConstString GetMangledName() const { return m_mangled; }
159153

160154
/// Best name get accessor.

0 commit comments

Comments
 (0)