Use Language::LanguageIsCPlusPlus instead of doing the same switch over language

llvm-svn: 246613
This commit is contained in:
Enrico Granata 2015-09-02 01:28:24 +00:00
parent df7e79e646
commit 578c8a7841
1 changed files with 3 additions and 10 deletions

View File

@ -58,14 +58,7 @@ CPlusPlusLanguage::GetPluginVersion()
Language *
CPlusPlusLanguage::CreateInstance (lldb::LanguageType language)
{
switch (language)
{
case lldb::eLanguageTypeC_plus_plus:
case lldb::eLanguageTypeC_plus_plus_03:
case lldb::eLanguageTypeC_plus_plus_11:
case lldb::eLanguageTypeC_plus_plus_14:
return new CPlusPlusLanguage();
default:
return nullptr;
}
if (Language::LanguageIsCPlusPlus(language))
return new CPlusPlusLanguage();
return nullptr;
}