Skip to content

Commit 27fa054

Browse files
committed
Plumb SymbolContext through to GetDisplayDemangledName
1 parent 0b84ad5 commit 27fa054

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

lldb/include/lldb/Symbol/Function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ class Function : public UserID, public SymbolContextScope {
537537

538538
ConstString GetNameNoArguments(const SymbolContext *sc = nullptr) const;
539539

540-
ConstString GetDisplayName() const;
540+
ConstString GetDisplayName(const SymbolContext *sc = nullptr) const;
541541

542542
const Mangled &GetMangled() const { return m_mangled; }
543543

lldb/include/lldb/Symbol/Symbol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Symbol : public SymbolContextScope {
130130

131131
ConstString GetNameNoArguments() const;
132132

133-
ConstString GetDisplayName() const;
133+
ConstString GetDisplayName(const SymbolContext *sc = nullptr) const;
134134

135135
uint32_t GetID() const { return m_uid; }
136136

lldb/source/Symbol/Function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,10 @@ bool Function::IsTopLevelFunction() {
498498
return result;
499499
}
500500

501-
ConstString Function::GetDisplayName() const {
501+
ConstString Function::GetDisplayName(const SymbolContext *sc) const {
502502
if (!m_mangled)
503503
return GetName();
504-
return m_mangled.GetDisplayDemangledName();
504+
return m_mangled.GetDisplayDemangledName(sc);
505505
}
506506

507507
CompilerDeclContext Function::GetDeclContext() {

lldb/source/Symbol/Symbol.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ bool Symbol::ValueIsAddress() const {
168168
return (bool)m_addr_range.GetBaseAddress().GetSection();
169169
}
170170

171-
ConstString Symbol::GetDisplayName() const {
172-
return GetMangled().GetDisplayDemangledName();
171+
ConstString Symbol::GetDisplayName(const SymbolContext *sc) const {
172+
return GetMangled().GetDisplayDemangledName(sc);
173173
}
174174

175175
ConstString Symbol::GetReExportedSymbolName() const {

lldb/source/Symbol/SymbolContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ bool SymbolContext::DumpStopContext(Stream *s, ExecutionContextScope *exe_scope,
9494
if (!show_function_arguments)
9595
name = function->GetNameNoArguments(this);
9696
if (!name && show_function_display_name)
97-
name = function->GetDisplayName();
97+
name = function->GetDisplayName(this);
9898
if (!name)
9999
name = function->GetName(this);
100100
if (name)
@@ -169,7 +169,7 @@ bool SymbolContext::DumpStopContext(Stream *s, ExecutionContextScope *exe_scope,
169169
s->PutCString("symbol stub for: ");
170170
ConstString name;
171171
if (show_function_display_name)
172-
name = symbol->GetDisplayName();
172+
name = symbol->GetDisplayName(this);
173173
if (!name)
174174
name = symbol->GetName();
175175
name.Dump(s);

0 commit comments

Comments
 (0)