diff options
| author | gingerBill <bill@gingerbill.org> | 2020-02-05 22:39:23 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-02-05 22:39:23 +0000 |
| commit | 992858b687d9ff53b53239864114ff7ece22449d (patch) | |
| tree | 002bc17b1ac9f064e2ff577f0c6250f8d4b12cf4 /src/types.cpp | |
| parent | b555b0083a58856f661c63fb574722f1fc64fee9 (diff) | |
Add ReturnStmt
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/types.cpp b/src/types.cpp index fde8cd5a5..2afba733c 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1143,13 +1143,13 @@ bool is_type_simd_vector(Type *t) { } Type *base_array_type(Type *t) { - if (is_type_array(t)) { - t = base_type(t); - return t->Array.elem; - } - if (is_type_simd_vector(t)) { - t = base_type(t); - return t->SimdVector.elem; + Type *bt = base_type(t); + if (is_type_array(bt)) { + return bt->Array.elem; + } else if (is_type_enumerated_array(bt)) { + return bt->EnumeratedArray.elem; + } else if (is_type_simd_vector(bt)) { + return bt->SimdVector.elem; } return t; } |