[Lldb-commits] [lldb] f3aa9e3 - [MachO] Update embedded part of ObjectFileMachO for Mangled API change
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 18 14:47:42 PST 2020
Author: Jonas Devlieghere
Date: 2020-11-18T14:47:31-08:00
New Revision: f3aa9e36d91b7b0f4f24f7a3b13cf80c11356e5e
URL: https://github.com/llvm/llvm-project/commit/f3aa9e36d91b7b0f4f24f7a3b13cf80c11356e5e
DIFF: https://github.com/llvm/llvm-project/commit/f3aa9e36d91b7b0f4f24f7a3b13cf80c11356e5e.diff
LOG: [MachO] Update embedded part of ObjectFileMachO for Mangled API change
Mangled::GetName and Mangled::GetDemangledName no longer take any
arguments.
Added:
Modified:
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index f9f27d0ee6c2..2653290ea8c7 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -3032,12 +3032,10 @@ size_t ObjectFileMachO::ParseSymtab() {
// contains just the filename, so here we combine
// it with the first one if we are minimizing the
// symbol table
- const char *so_path =
- sym[sym_idx - 1]
- .GetMangled()
- .GetDemangledName(
- lldb::eLanguageTypeUnknown)
- .AsCString();
+ const char *so_path = sym[sym_idx - 1]
+ .GetMangled()
+ .GetDemangledName()
+ .AsCString();
if (so_path && so_path[0]) {
std::string full_so_path(so_path);
const size_t double_slash_pos =
@@ -3469,12 +3467,10 @@ size_t ObjectFileMachO::ParseSymtab() {
sym[sym_idx].GetMangled().SetValue(
const_symbol_name, symbol_name_is_mangled);
if (is_gsym && is_debug) {
- const char *gsym_name =
- sym[sym_idx]
- .GetMangled()
- .GetName(lldb::eLanguageTypeUnknown,
- Mangled::ePreferMangled)
- .GetCString();
+ const char *gsym_name = sym[sym_idx]
+ .GetMangled()
+ .GetName()
+ .GetCString();
if (gsym_name)
N_GSYM_name_to_sym_idx[gsym_name] = sym_idx;
}
@@ -3554,12 +3550,8 @@ size_t ObjectFileMachO::ParseSymtab() {
bool found_it = false;
for (auto pos = range.first; pos != range.second;
++pos) {
- if (sym[sym_idx].GetMangled().GetName(
- lldb::eLanguageTypeUnknown,
- Mangled::ePreferMangled) ==
- sym[pos->second].GetMangled().GetName(
- lldb::eLanguageTypeUnknown,
- Mangled::ePreferMangled)) {
+ if (sym[sym_idx].GetMangled().GetName() ==
+ sym[pos->second].GetMangled().GetName()) {
m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
// We just need the flags from the linker
// symbol, so put these flags
@@ -3599,12 +3591,8 @@ size_t ObjectFileMachO::ParseSymtab() {
bool found_it = false;
for (auto pos = range.first; pos != range.second;
++pos) {
- if (sym[sym_idx].GetMangled().GetName(
- lldb::eLanguageTypeUnknown,
- Mangled::ePreferMangled) ==
- sym[pos->second].GetMangled().GetName(
- lldb::eLanguageTypeUnknown,
- Mangled::ePreferMangled)) {
+ if (sym[sym_idx].GetMangled().GetName() ==
+ sym[pos->second].GetMangled().GetName()) {
m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
// We just need the flags from the linker
// symbol, so put these flags
@@ -3622,12 +3610,10 @@ size_t ObjectFileMachO::ParseSymtab() {
if (found_it)
continue;
} else {
- const char *gsym_name =
- sym[sym_idx]
- .GetMangled()
- .GetName(lldb::eLanguageTypeUnknown,
- Mangled::ePreferMangled)
- .GetCString();
+ const char *gsym_name = sym[sym_idx]
+ .GetMangled()
+ .GetName()
+ .GetCString();
if (gsym_name) {
// Combine N_GSYM stab entries with the non
// stab symbol
@@ -4348,10 +4334,8 @@ size_t ObjectFileMachO::ParseSymtab() {
}
if (is_gsym) {
- const char *gsym_name = sym[sym_idx]
- .GetMangled()
- .GetName(Mangled::ePreferMangled)
- .GetCString();
+ const char *gsym_name =
+ sym[sym_idx].GetMangled().GetName().GetCString();
if (gsym_name)
N_GSYM_name_to_sym_idx[gsym_name] = sym_idx;
}
@@ -4415,9 +4399,8 @@ size_t ObjectFileMachO::ParseSymtab() {
if (range.first != range.second) {
for (ValueToSymbolIndexMap::const_iterator pos = range.first;
pos != range.second; ++pos) {
- if (sym[sym_idx].GetMangled().GetName(Mangled::ePreferMangled) ==
- sym[pos->second].GetMangled().GetName(
- Mangled::ePreferMangled)) {
+ if (sym[sym_idx].GetMangled().GetName() ==
+ sym[pos->second].GetMangled().GetName()) {
m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
// We just need the flags from the linker symbol, so put these
// flags into the N_FUN flags to avoid duplicate symbols in the
@@ -4450,9 +4433,8 @@ size_t ObjectFileMachO::ParseSymtab() {
if (range.first != range.second) {
for (ValueToSymbolIndexMap::const_iterator pos = range.first;
pos != range.second; ++pos) {
- if (sym[sym_idx].GetMangled().GetName(Mangled::ePreferMangled) ==
- sym[pos->second].GetMangled().GetName(
- Mangled::ePreferMangled)) {
+ if (sym[sym_idx].GetMangled().GetName() ==
+ sym[pos->second].GetMangled().GetName()) {
m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
// We just need the flags from the linker symbol, so put these
// flags into the N_STSYM flags to avoid duplicate symbols in
@@ -4465,10 +4447,8 @@ size_t ObjectFileMachO::ParseSymtab() {
}
} else {
// Combine N_GSYM stab entries with the non stab symbol.
- const char *gsym_name = sym[sym_idx]
- .GetMangled()
- .GetName(Mangled::ePreferMangled)
- .GetCString();
+ const char *gsym_name =
+ sym[sym_idx].GetMangled().GetName().GetCString();
if (gsym_name) {
ConstNameToSymbolIndexMap::const_iterator pos =
N_GSYM_name_to_sym_idx.find(gsym_name);
More information about the lldb-commits
mailing list