Author: vadimcn Date: Tue Jun 6 15:40:24 2017 New Revision: 304832 URL: http://llvm.org/viewvc/llvm-project?rev=304832&view=rev Log: Use exact equality for category language matching, for all languages, except those specifically mentioned.
Modified: lldb/trunk/source/DataFormatters/TypeCategory.cpp Modified: lldb/trunk/source/DataFormatters/TypeCategory.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeCategory.cpp?rev=304832&r1=304831&r2=304832&view=diff ============================================================================== --- lldb/trunk/source/DataFormatters/TypeCategory.cpp (original) +++ lldb/trunk/source/DataFormatters/TypeCategory.cpp Tue Jun 6 15:40:24 2017 @@ -36,23 +36,8 @@ TypeCategoryImpl::TypeCategoryImpl( static bool IsApplicable(lldb::LanguageType category_lang, lldb::LanguageType valobj_lang) { switch (category_lang) { - // these are not languages that LLDB would ordinarily deal with - // only allow an exact equality here, since we really don't know - // any better - case eLanguageTypeAda83: - case eLanguageTypeCobol74: - case eLanguageTypeCobol85: - case eLanguageTypeFortran77: - case eLanguageTypeFortran90: - case eLanguageTypePascal83: - case eLanguageTypeModula2: - case eLanguageTypeJava: - case eLanguageTypeAda95: - case eLanguageTypeFortran95: - case eLanguageTypePLI: - case eLanguageTypeUPC: - case eLanguageTypeD: - case eLanguageTypePython: + // Unless we know better, allow only exact equality. + default: return category_lang == valobj_lang; // the C family, we consider it as one @@ -80,7 +65,7 @@ static bool IsApplicable(lldb::LanguageT valobj_lang == eLanguageTypeC_plus_plus || valobj_lang == eLanguageTypeObjC; - default: + // Categories with unspecified language match everything. case eLanguageTypeUnknown: return true; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits