[Lldb-commits] [lldb] r113899 - /lldb/trunk/source/Core/Mangled.cpp
Greg Clayton
gclayton at apple.com
Tue Sep 14 16:44:49 PDT 2010
Author: gclayton
Date: Tue Sep 14 18:44:49 2010
New Revision: 113899
URL: http://llvm.org/viewvc/llvm-project?rev=113899&view=rev
Log:
Fixed a compiler warning.
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=113899&r1=113898&r2=113899&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Tue Sep 14 18:44:49 2010
@@ -216,25 +216,19 @@
const ConstString&
Mangled::GetName (Mangled::NamePreference preference) const
{
- switch (preference)
+ if (preference == ePreferDemangled)
{
- case ePreferDemangled:
- {
- const ConstString& name = GetDemangledName();
- if (name && !name.IsEmpty())
- return name;
- return m_mangled;
- }
- break;
- case ePreferMangled:
- {
- const ConstString& name = GetMangledName();
- if (name && !name.IsEmpty())
- return name;
- return m_demangled;
-
- }
- break;
+ const ConstString& name = GetDemangledName();
+ if (name && !name.IsEmpty())
+ return name;
+ return m_mangled;
+ }
+ else
+ {
+ const ConstString& name = GetMangledName();
+ if (name && !name.IsEmpty())
+ return name;
+ return m_demangled;
}
}
More information about the lldb-commits
mailing list