[Lldb-commits] [lldb] r213681 - Mangled: Fix an 'unused variable' warning on GNU/Linux

David Majnemer david.majnemer at gmail.com
Tue Jul 22 13:36:37 PDT 2014


Author: majnemer
Date: Tue Jul 22 15:36:37 2014
New Revision: 213681

URL: http://llvm.org/viewvc/llvm-project?rev=213681&view=rev
Log:
Mangled: Fix an 'unused variable' warning on GNU/Linux

Platforms which don't use LLDB's built-in demangler don't use the
'mangled_length' variable.  Instead, replace it's only use by an
expression it is equivalent to.

Differential Revision: http://reviews.llvm.org/D4625

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=213681&r1=213680&r2=213681&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Tue Jul 22 15:36:37 2014
@@ -5158,7 +5158,6 @@ Mangled::GetDemangledName () const
 
         // Don't bother running anything that isn't mangled
         const char *mangled_cstr = m_mangled.GetCString();
-        long mangled_length = m_mangled.GetLength();
         if (cstring_is_mangled(mangled_cstr))
         {
             if (!m_mangled.GetMangledCounterpart(m_demangled))
@@ -5170,7 +5169,7 @@ Mangled::GetDemangledName () const
                 // performance win, falling back to the full demangler only
                 // when necessary
                 char *demangled_name = FastDemangle (mangled_cstr,
-                                                     mangled_length);
+                                                     m_mangled.GetLength());
                 if (!demangled_name)
                     demangled_name = __cxa_demangle (mangled_cstr, NULL, NULL, NULL);
 #elif defined(_MSC_VER)





More information about the lldb-commits mailing list