forked from OSchip/llvm-project
[flang] Correct TypeCode::IsLogical()
F18 is using the type codes for C's "least" int types to encode the various kinds of Fortran's LOGICAL intrinsic type; update the IsLogical() predicate accordingly. (This member function isn't yet used anywhere, so this patch is nearly an NFC.) Differential Revision: https://reviews.llvm.org/D100323
This commit is contained in:
parent
52e9d80d5d
commit
5fe83b048a
|
@ -45,7 +45,7 @@ public:
|
|||
}
|
||||
constexpr bool IsLogical() const {
|
||||
return raw_ == CFI_type_Bool ||
|
||||
(raw_ >= CFI_type_int_fast8_t && raw_ <= CFI_type_int_fast64_t);
|
||||
(raw_ >= CFI_type_int_least8_t && raw_ <= CFI_type_int_least64_t);
|
||||
}
|
||||
constexpr bool IsDerived() const { return raw_ == CFI_type_struct; }
|
||||
constexpr bool IsIntrinsic() const { return IsValid() && !IsDerived(); }
|
||||
|
|
Loading…
Reference in New Issue