comparison gen/complex.cpp @ 625:7e0a766fef47

Make typedef'ed complex types work.
author Christian Kamm <kamm incasoftware de>
date Wed, 01 Oct 2008 19:15:17 +0200
parents 634fbbdec390
children 4ac97ec7c18e
comparison
equal deleted inserted replaced
624:eb444ed4a2d3 625:7e0a766fef47
90 { 90 {
91 const LLType* complexTy = DtoType(to); 91 const LLType* complexTy = DtoType(to);
92 92
93 Type* baserety; 93 Type* baserety;
94 Type* baseimty; 94 Type* baseimty;
95 TY ty = to->ty; 95 TY ty = to->toBasetype()->ty;
96 if (ty == Tcomplex32) { 96 if (ty == Tcomplex32) {
97 baserety = Type::tfloat32; 97 baserety = Type::tfloat32;
98 baseimty = Type::timaginary32; 98 baseimty = Type::timaginary32;
99 } else if (ty == Tcomplex64) { 99 } else if (ty == Tcomplex64) {
100 baserety = Type::tfloat64; 100 baserety = Type::tfloat64;
134 { 134 {
135 const LLType* base = DtoComplexBaseType(to); 135 const LLType* base = DtoComplexBaseType(to);
136 136
137 Type* baserety; 137 Type* baserety;
138 Type* baseimty; 138 Type* baseimty;
139 TY ty = to->ty; 139 TY ty = to->toBasetype()->ty;
140 if (ty == Tcomplex32) { 140 if (ty == Tcomplex32) {
141 baserety = Type::tfloat32; 141 baserety = Type::tfloat32;
142 baseimty = Type::timaginary32; 142 baseimty = Type::timaginary32;
143 } else if (ty == Tcomplex64) { 143 } else if (ty == Tcomplex64) {
144 baserety = Type::tfloat64; 144 baserety = Type::tfloat64;