Skip to content

Commit

Permalink
Don't demangle a name when Mangled::GetName() is called with ePreferM…
Browse files Browse the repository at this point in the history
…angled. Only demangle if this isn't the the value for the "preference" argument indicating the user wants the demangled name. This will stop a lot of symbols from being demangled when parsing the symbol table in ObjectFileMachO.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@255864 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Greg Clayton committed Dec 17, 2015
1 parent b0b5b9f commit f9408c3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions source/Core/Mangled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ Mangled::NameMatches (const RegularExpression& regex, lldb::LanguageType languag
ConstString
Mangled::GetName (lldb::LanguageType language, Mangled::NamePreference preference) const
{
if (preference == ePreferMangled && m_mangled)
return m_mangled;

ConstString demangled = GetDemangledName(language);

if (preference == ePreferDemangledWithoutArguments)
Expand All @@ -376,12 +379,7 @@ Mangled::GetName (lldb::LanguageType language, Mangled::NamePreference preferenc
return demangled;
return m_mangled;
}
else
{
if (m_mangled)
return m_mangled;
return demangled;
}
return demangled;
}

//----------------------------------------------------------------------
Expand Down

0 comments on commit f9408c3

Please sign in to comment.