Don't demangle a name when Mangled::GetName() is called with ePreferMangled. 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.

llvm-svn: 255864
This commit is contained in:
Greg Clayton 2015-12-17 01:00:50 +00:00
parent 8b8874edbc
commit 3feddff744
1 changed files with 4 additions and 6 deletions

View File

@ -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)
@ -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;
}
//----------------------------------------------------------------------