diff gen/llvmhelpers.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 83ade4f4025a
children ac1fcc138e42
line wrap: on
line diff
--- a/gen/llvmhelpers.h	Sat Jul 26 15:42:05 2008 +0200
+++ b/gen/llvmhelpers.h	Sat Jul 26 17:19:16 2008 +0200
@@ -39,16 +39,16 @@
 LLValue* DtoNestedVariable(VarDeclaration* vd);
 
 // basic operations
-void DtoAssign(DValue* lhs, DValue* rhs);
+void DtoAssign(Loc& loc, DValue* lhs, DValue* rhs);
 
 // create a null dvalue
 DValue* DtoNullValue(Type* t);
 
 // casts
-DValue* DtoCastInt(DValue* val, Type* to);
-DValue* DtoCastPtr(DValue* val, Type* to);
-DValue* DtoCastFloat(DValue* val, Type* to);
-DValue* DtoCast(DValue* val, Type* to);
+DValue* DtoCastInt(Loc& loc, DValue* val, Type* to);
+DValue* DtoCastPtr(Loc& loc, DValue* val, Type* to);
+DValue* DtoCastFloat(Loc& loc, DValue* val, Type* to);
+DValue* DtoCast(Loc& loc, DValue* val, Type* to);
 
 // is template instance check
 bool DtoIsTemplateInstance(Dsymbol* s);
@@ -102,6 +102,6 @@
 DValue* DtoCallDFunc(FuncDeclaration* fdecl, Array* arguments, TypeClass* type=0, LLValue* thismem=0);
 
 /// Converts any value to a boolean (llvm i1)
-LLValue* DtoBoolean(DValue* dval);
+LLValue* DtoBoolean(Loc& loc, DValue* dval);
 
 #endif