[Lldb-commits] [lldb] r246613 - Use Language::LanguageIsCPlusPlus instead of doing the same switch over language
Enrico Granata via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 1 18:28:24 PDT 2015
Author: enrico
Date: Tue Sep 1 20:28:24 2015
New Revision: 246613
URL: http://llvm.org/viewvc/llvm-project?rev=246613&view=rev
Log:
Use Language::LanguageIsCPlusPlus instead of doing the same switch over language
Modified:
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=246613&r1=246612&r2=246613&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Tue Sep 1 20:28:24 2015
@@ -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;
}
More information about the lldb-commits
mailing list