From 578c8a784161cd8032d5c4cd3e960ee0a1a2f01b Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 2 Sep 2015 01:28:24 +0000 Subject: [PATCH] Use Language::LanguageIsCPlusPlus instead of doing the same switch over language llvm-svn: 246613 --- .../Language/CPlusPlus/CPlusPlusLanguage.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp index a0291462a6e2..b44ba55853e8 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -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; }