summaryrefslogtreecommitdiff
path: root/lldb/source/Symbol/SymbolContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol/SymbolContext.cpp')
-rw-r--r--lldb/source/Symbol/SymbolContext.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index 9eb805976f95..12c2077154b9 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -1,4 +1,4 @@
-//===-- SymbolContext.cpp ---------------------------------------*- C++ -*-===//
+//===-- SymbolContext.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -117,9 +117,7 @@ bool SymbolContext::DumpStopContext(Stream *s, ExecutionContextScope *exe_scope,
Block *inlined_block = block->GetContainingInlinedBlock();
const InlineFunctionInfo *inlined_block_info =
inlined_block->GetInlinedFunctionInfo();
- s->Printf(
- " [inlined] %s",
- inlined_block_info->GetName(function->GetLanguage()).GetCString());
+ s->Printf(" [inlined] %s", inlined_block_info->GetName().GetCString());
lldb_private::AddressRange block_range;
if (inlined_block->GetRangeContainingAddress(addr, block_range)) {
@@ -657,12 +655,12 @@ SymbolContext::GetFunctionName(Mangled::NamePreference preference) const {
const InlineFunctionInfo *inline_info =
inlined_block->GetInlinedFunctionInfo();
if (inline_info)
- return inline_info->GetName(function->GetLanguage());
+ return inline_info->GetName();
}
}
- return function->GetMangled().GetName(function->GetLanguage(), preference);
+ return function->GetMangled().GetName(preference);
} else if (symbol && symbol->ValueIsAddress()) {
- return symbol->GetMangled().GetName(symbol->GetLanguage(), preference);
+ return symbol->GetMangled().GetName(preference);
} else {
// No function, return an empty string.
return ConstString();
@@ -970,7 +968,7 @@ bool SymbolContextSpecifier::AddSpecification(const char *spec_string,
// CompUnits can't necessarily be resolved here, since an inlined function
// might show up in a number of CompUnits. Instead we just convert to a
// FileSpec and store it away.
- m_file_spec_up.reset(new FileSpec(spec_string));
+ m_file_spec_up = std::make_unique<FileSpec>(spec_string);
m_type |= eFileSpecified;
break;
case eLineStartSpecified:
@@ -1076,19 +1074,17 @@ bool SymbolContextSpecifier::SymbolContextMatches(SymbolContext &sc) {
if (inline_info != nullptr) {
was_inlined = true;
const Mangled &name = inline_info->GetMangled();
- if (!name.NameMatches(func_name, sc.function->GetLanguage()))
+ if (!name.NameMatches(func_name))
return false;
}
}
// If it wasn't inlined, check the name in the function or symbol:
if (!was_inlined) {
if (sc.function != nullptr) {
- if (!sc.function->GetMangled().NameMatches(func_name,
- sc.function->GetLanguage()))
+ if (!sc.function->GetMangled().NameMatches(func_name))
return false;
} else if (sc.symbol != nullptr) {
- if (!sc.symbol->GetMangled().NameMatches(func_name,
- sc.symbol->GetLanguage()))
+ if (!sc.symbol->GetMangled().NameMatches(func_name))
return false;
}
}