diff 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
line wrap: on
line diff
--- a/gen/complex.h	Sat Jul 26 15:42:05 2008 +0200
+++ b/gen/complex.h	Sat Jul 26 17:19:16 2008 +0200
@@ -11,21 +11,21 @@
 
 LLValue* DtoRealPart(DValue* val);
 LLValue* DtoImagPart(DValue* val);
-DValue* DtoComplex(Type* to, DValue* val);
+DValue* DtoComplex(Loc& loc, Type* to, DValue* val);
 
 void DtoComplexAssign(LLValue* l, LLValue* r);
 void DtoComplexSet(LLValue* c, LLValue* re, LLValue* im);
 
 void DtoGetComplexParts(DValue* c, LLValue*& re, LLValue*& im);
 
-DValue* DtoComplexAdd(Type* type, DValue* lhs, DValue* rhs);
-DValue* DtoComplexSub(Type* type, DValue* lhs, DValue* rhs);
-DValue* DtoComplexMul(Type* type, DValue* lhs, DValue* rhs);
-DValue* DtoComplexDiv(Type* type, DValue* lhs, DValue* rhs);
-DValue* DtoComplexNeg(Type* type, DValue* val);
+DValue* DtoComplexAdd(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
+DValue* DtoComplexSub(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
+DValue* DtoComplexMul(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
+DValue* DtoComplexDiv(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
+DValue* DtoComplexNeg(Loc& loc, Type* type, DValue* val);
 
-LLValue* DtoComplexEquals(TOK op, DValue* lhs, DValue* rhs);
+LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs);
 
-DValue* DtoCastComplex(DValue* val, Type* to);
+DValue* DtoCastComplex(Loc& loc, DValue* val, Type* to);
 
 #endif // LLVMDC_GEN_COMPLEX_H