forked from OSchip/llvm-project
Use exact equality for category language matching, for all languages, except those specifically mentioned.
llvm-svn: 304832
This commit is contained in:
parent
f16a45ea15
commit
98e3e6003d
|
@ -36,23 +36,8 @@ TypeCategoryImpl::TypeCategoryImpl(
|
||||||
static bool IsApplicable(lldb::LanguageType category_lang,
|
static bool IsApplicable(lldb::LanguageType category_lang,
|
||||||
lldb::LanguageType valobj_lang) {
|
lldb::LanguageType valobj_lang) {
|
||||||
switch (category_lang) {
|
switch (category_lang) {
|
||||||
// these are not languages that LLDB would ordinarily deal with
|
// Unless we know better, allow only exact equality.
|
||||||
// only allow an exact equality here, since we really don't know
|
default:
|
||||||
// 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:
|
|
||||||
return category_lang == valobj_lang;
|
return category_lang == valobj_lang;
|
||||||
|
|
||||||
// the C family, we consider it as one
|
// the C family, we consider it as one
|
||||||
|
@ -80,7 +65,7 @@ static bool IsApplicable(lldb::LanguageType category_lang,
|
||||||
valobj_lang == eLanguageTypeC_plus_plus ||
|
valobj_lang == eLanguageTypeC_plus_plus ||
|
||||||
valobj_lang == eLanguageTypeObjC;
|
valobj_lang == eLanguageTypeObjC;
|
||||||
|
|
||||||
default:
|
// Categories with unspecified language match everything.
|
||||||
case eLanguageTypeUnknown:
|
case eLanguageTypeUnknown:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue