Skip to content

Commit ba90ef6

Browse files
authored
[lldb] Prevent GetDisplayDemangledName from returning empty string (#8965)
(cherry-picked from commit c4654ad)
1 parent cf542c6 commit ba90ef6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lldb/include/lldb/Target/Language.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class Language : public PluginInterface {
283283
return mangled.GetMangledName();
284284
}
285285

286-
virtual ConstString GetDisplayDemangledName(Mangled mangled) const {
286+
virtual ConstString GetDisplayDemangledName(const Mangled &mangled) const {
287287
return mangled.GetDemangledName();
288288
}
289289

lldb/source/Core/Mangled.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ ConstString Mangled::GetDisplayDemangledName(
364364
// END SWIFT
365365

366366
if (Language *lang = Language::FindPlugin(GuessLanguage()))
367-
return lang->GetDisplayDemangledName(*this);
367+
if (ConstString display_name = lang->GetDisplayDemangledName(*this))
368+
return display_name;
368369
return GetDemangledName();
369370
}
370371

0 commit comments

Comments
 (0)