[Lldb-commits] [lldb] r181645 - Use mangled and demangled names when checking for a function in a namespace and a function in an anonymous namespace, respectively.

Matt Kopec Matt.Kopec at intel.com
Fri May 10 15:55:24 PDT 2013


Author: mkopec
Date: Fri May 10 17:55:24 2013
New Revision: 181645

URL: http://llvm.org/viewvc/llvm-project?rev=181645&view=rev
Log:
Use mangled and demangled names when checking for a function in a namespace and a function in an anonymous namespace, respectively.

Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=181645&r1=181644&r2=181645&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri May 10 17:55:24 2013
@@ -3563,9 +3563,10 @@ SymbolFileDWARF::FindFunctions (const Co
                     {
                         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);
                             }





More information about the lldb-commits mailing list