Skip to content

Commit

Permalink
Mangled: Fix an 'unused variable' warning on GNU/Linux
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213681 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
majnemer committed Jul 22, 2014
1 parent 0875205 commit d371bf8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/Core/Mangled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit d371bf8

Please sign in to comment.