Fixed a compiler warning.

llvm-svn: 113899
This commit is contained in:
Greg Clayton 2010-09-14 23:44:49 +00:00
parent e97b1ebef1
commit 8742543591
1 changed files with 12 additions and 18 deletions

View File

@ -216,25 +216,19 @@ Mangled::GetMangledName () const
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;
}
}