Use mangled and demangled names when checking for a function in a namespace and a function in an anonymous namespace, respectively.
llvm-svn: 181645
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 9a8030a..9b363b1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3563,9 +3563,10 @@
{
if (temp_sc_list.GetContextAtIndex(i, sc))
{
- ConstString func_name = sc.GetFunctionName(Mangled::ePreferDemangled);
- if (!strncmp(name.GetCString(), "_ZN", 3) ||
- strncmp(name.GetCString(), "(anonymous namespace)", 21))
+ ConstString mangled_name = sc.GetFunctionName(Mangled::ePreferMangled);
+ ConstString demangled_name = sc.GetFunctionName(Mangled::ePreferDemangled);
+ if (!strncmp(mangled_name.GetCString(), "_ZN", 3) ||
+ strncmp(demangled_name.GetCString(), "(anonymous namespace)", 21))
{
sc_list.Append(sc);
}