Fix GetDisplayName when only a demangled name is available
authorFrancis Ricci <francisjricci@gmail.com>
Thu, 6 Oct 2016 20:41:11 +0000 (20:41 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Thu, 6 Oct 2016 20:41:11 +0000 (20:41 +0000)
Summary:
GetDisplayDemangledName will already return a ConstString() when
there is neither a mangled name or a demangled name, so we don't need to special
case here. This will fix GetDisplayName in cases where m_mangled contains
only a demangled name and not a mangled name.

Reviewers: clayborg, granata.enrico, sas

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D25201

llvm-svn: 283491

lldb/source/Symbol/Function.cpp
lldb/source/Symbol/Symbol.cpp

index 9634616..8fde0a4 100644 (file)
@@ -347,8 +347,6 @@ bool Function::IsTopLevelFunction() {
 }
 
 ConstString Function::GetDisplayName() const {
-  if (!m_mangled)
-    return ConstString();
   return m_mangled.GetDisplayDemangledName(GetLanguage());
 }
 
index 623930c..d243657 100644 (file)
@@ -117,8 +117,6 @@ bool Symbol::ValueIsAddress() const {
 }
 
 ConstString Symbol::GetDisplayName() const {
-  if (!m_mangled)
-    return ConstString();
   return m_mangled.GetDisplayDemangledName(GetLanguage());
 }