[Lldb-commits] [lldb] r121835 - /lldb/trunk/source/Core/Mangled.cpp

Jason Molenda jmolenda at apple.com
Tue Dec 14 20:27:04 PST 2010


Author: jmolenda
Date: Tue Dec 14 22:27:04 2010
New Revision: 121835

URL: http://llvm.org/viewvc/llvm-project?rev=121835&view=rev
Log:
Move the demangle-failed indication out a bit so other failing cases
also get marked as having failed (so we don't try to demangle the
same symbol multiple times).


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=121835&r1=121834&r2=121835&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Tue Dec 14 22:27:04 2010
@@ -181,14 +181,14 @@
                     g_mangled_to_demangled.insert (std::make_pair (mangled, m_demangled.GetCString()));
                     free (demangled_name);
                 }
-                else
-                {
-                    // Set the demangled string to the empty string to indicate we
-                    // tried to parse it once and failed.
-                    m_demangled.SetCString("");
-                }
             }
         }
+        if (!m_demangled)
+        {
+            // Set the demangled string to the empty string to indicate we
+            // tried to parse it once and failed.
+            m_demangled.SetCString("");
+        }
     }
 
     return m_demangled;





More information about the lldb-commits mailing list