Author: gclayton Date: Wed Dec 16 19:00:50 2015 New Revision: 255864 URL: http://llvm.org/viewvc/llvm-project?rev=255864&view=rev Log: 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.
Modified: lldb/trunk/source/Core/Mangled.cpp Modified: lldb/trunk/source/Core/Mangled.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=255864&r1=255863&r2=255864&view=diff ============================================================================== --- lldb/trunk/source/Core/Mangled.cpp (original) +++ lldb/trunk/source/Core/Mangled.cpp Wed Dec 16 19:00:50 2015 @@ -362,6 +362,9 @@ Mangled::NameMatches (const RegularExpre 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 lan return demangled; return m_mangled; } - else - { - if (m_mangled) - return m_mangled; - return demangled; - } + return demangled; } //---------------------------------------------------------------------- _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits