aboutsummaryrefslogtreecommitdiff
path: root/source/Symbol/Function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Symbol/Function.cpp')
-rw-r--r--source/Symbol/Function.cpp54
1 files changed, 48 insertions, 6 deletions
diff --git a/source/Symbol/Function.cpp b/source/Symbol/Function.cpp
index 0b7430ad75e3..77448d4f2a22 100644
--- a/source/Symbol/Function.cpp
+++ b/source/Symbol/Function.cpp
@@ -77,7 +77,7 @@ FunctionInfo::GetDeclaration() const
return m_declaration;
}
-const ConstString&
+ConstString
FunctionInfo::GetName() const
{
return m_name;
@@ -140,25 +140,32 @@ InlineFunctionInfo::Dump(Stream *s, bool show_fullpaths) const
}
void
-InlineFunctionInfo::DumpStopContext (Stream *s) const
+InlineFunctionInfo::DumpStopContext (Stream *s, LanguageType language) const
{
// s->Indent("[inlined] ");
s->Indent();
if (m_mangled)
- s->PutCString (m_mangled.GetName().AsCString());
+ s->PutCString (m_mangled.GetName(language).AsCString());
else
s->PutCString (m_name.AsCString());
}
-const ConstString &
-InlineFunctionInfo::GetName () const
+ConstString
+InlineFunctionInfo::GetName (LanguageType language) const
{
if (m_mangled)
- return m_mangled.GetName();
+ return m_mangled.GetName(language);
return m_name;
}
+ConstString
+InlineFunctionInfo::GetDisplayName (LanguageType language) const
+{
+ if (m_mangled)
+ return m_mangled.GetDisplayDemangledName(language);
+ return m_name;
+}
Declaration &
InlineFunctionInfo::GetCallSite ()
@@ -459,6 +466,14 @@ Function::MemorySize () const
return mem_size;
}
+ConstString
+Function::GetDisplayName () const
+{
+ if (!m_mangled)
+ return ConstString();
+ return m_mangled.GetDisplayDemangledName(GetLanguage());
+}
+
clang::DeclContext *
Function::GetClangDeclContext()
{
@@ -602,5 +617,32 @@ Function::GetPrologueByteSize ()
return m_prologue_byte_size;
}
+lldb::LanguageType
+Function::GetLanguage() const
+{
+ if (m_comp_unit)
+ return m_comp_unit->GetLanguage();
+ else
+ return lldb::eLanguageTypeUnknown;
+}
+
+ConstString
+Function::GetName() const
+{
+ LanguageType language = lldb::eLanguageTypeUnknown;
+ if (m_comp_unit)
+ language = m_comp_unit->GetLanguage();
+ return m_mangled.GetName(language);
+}
+
+ConstString
+Function::GetNameNoArguments() const
+{
+ LanguageType language = lldb::eLanguageTypeUnknown;
+ if (m_comp_unit)
+ language = m_comp_unit->GetLanguage();
+ return m_mangled.GetName(language, Mangled::ePreferDemangledWithoutArguments);
+}
+