Skip to content

Commit

Permalink
[flang] Hanlde COMPLEX 2/3/10 in runtime TypeCode(cat, kind)
Browse files Browse the repository at this point in the history
Type codes for COMPLEX kinds 2, 3, and 10 were added in https://reviews.llvm.org/D117336
but handling for these kinds in TypeCode(cat, kind) has not been added
yet.

Differential Revision: https://reviews.llvm.org/D121587
  • Loading branch information
jeanPerier committed Mar 15, 2022
1 parent 252bc2b commit a69cb78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flang/runtime/type-code.cpp
Expand Up @@ -55,13 +55,21 @@ TypeCode::TypeCode(TypeCategory f, int kind) {
break;
case TypeCategory::Complex:
switch (kind) {
case 2:
raw_ = CFI_type_half_float_Complex;
break;
case 3:
raw_ = CFI_type_bfloat_Complex;
break;
case 4:
raw_ = CFI_type_float_Complex;
break;
case 8:
raw_ = CFI_type_double_Complex;
break;
case 10:
raw_ = CFI_type_extended_double_Complex;
break;
case 16:
raw_ = CFI_type_long_double_Complex;
break;
Expand Down

0 comments on commit a69cb78

Please sign in to comment.