comparison gen/complex.h @ 399:0e6b4d65d3f8

Give error messages for invalid casts. This required passing Loc information to certain functions. Fixes nocompile/b/bug_cgcs_354_A/B.
author Christian Kamm <kamm incasoftware de>
date Sat, 26 Jul 2008 17:19:16 +0200
parents a95056b3c996
children fbb1a366cfbc
comparison
equal deleted inserted replaced
398:811f82dfddbd 399:0e6b4d65d3f8
9 9
10 LLConstant* DtoComplexShuffleMask(unsigned a, unsigned b); 10 LLConstant* DtoComplexShuffleMask(unsigned a, unsigned b);
11 11
12 LLValue* DtoRealPart(DValue* val); 12 LLValue* DtoRealPart(DValue* val);
13 LLValue* DtoImagPart(DValue* val); 13 LLValue* DtoImagPart(DValue* val);
14 DValue* DtoComplex(Type* to, DValue* val); 14 DValue* DtoComplex(Loc& loc, Type* to, DValue* val);
15 15
16 void DtoComplexAssign(LLValue* l, LLValue* r); 16 void DtoComplexAssign(LLValue* l, LLValue* r);
17 void DtoComplexSet(LLValue* c, LLValue* re, LLValue* im); 17 void DtoComplexSet(LLValue* c, LLValue* re, LLValue* im);
18 18
19 void DtoGetComplexParts(DValue* c, LLValue*& re, LLValue*& im); 19 void DtoGetComplexParts(DValue* c, LLValue*& re, LLValue*& im);
20 20
21 DValue* DtoComplexAdd(Type* type, DValue* lhs, DValue* rhs); 21 DValue* DtoComplexAdd(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
22 DValue* DtoComplexSub(Type* type, DValue* lhs, DValue* rhs); 22 DValue* DtoComplexSub(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
23 DValue* DtoComplexMul(Type* type, DValue* lhs, DValue* rhs); 23 DValue* DtoComplexMul(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
24 DValue* DtoComplexDiv(Type* type, DValue* lhs, DValue* rhs); 24 DValue* DtoComplexDiv(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
25 DValue* DtoComplexNeg(Type* type, DValue* val); 25 DValue* DtoComplexNeg(Loc& loc, Type* type, DValue* val);
26 26
27 LLValue* DtoComplexEquals(TOK op, DValue* lhs, DValue* rhs); 27 LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs);
28 28
29 DValue* DtoCastComplex(DValue* val, Type* to); 29 DValue* DtoCastComplex(Loc& loc, DValue* val, Type* to);
30 30
31 #endif // LLVMDC_GEN_COMPLEX_H 31 #endif // LLVMDC_GEN_COMPLEX_H