[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:
peter klausler 2021-04-12 10:10:38 -07:00
parent 52e9d80d5d
commit 5fe83b048a
1 changed files with 1 additions and 1 deletions

View File

@ -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(); }