diff gen/llvmhelpers.h @ 347:6057fdf797d8 trunk

[svn r368] Fixed custom class allocators with arbitrary user arguments. Closes #25 Removed some dead code. Started on a more generalised approach to call misc. D functions.
author lindquist
date Sun, 13 Jul 2008 20:49:10 +0200
parents d59c363fccad
children 44daf304421c
line wrap: on
line diff
--- a/gen/llvmhelpers.h	Sun Jul 13 09:14:01 2008 +0200
+++ b/gen/llvmhelpers.h	Sun Jul 13 20:49:10 2008 +0200
@@ -1,6 +1,7 @@
 #ifndef LLVMDC_GEN_LLVMHELPERS_H
 #define LLVMDC_GEN_LLVMHELPERS_H
 
+#include "gen/llvm.h"
 #include "statement.h"
 
 // dynamic memory helpers
@@ -87,4 +88,14 @@
 // target stuff
 void findDefaultTarget();
 
+/**
+ * Calls a D function (with D calling conv).
+ * @param fdecl The FuncDeclaration to call
+ * @param arguments The Array of ExpressionS to pass as arguments.
+ * @param type Optionally the TypeClass of the 'this' arguement.
+ * @param thismem Optionally the LLValue for the 'this' argument.
+ * @return The function call's return value.
+ */
+DValue* DtoCallDFunc(FuncDeclaration* fdecl, Array* arguments, TypeClass* type=0, LLValue* thismem=0);
+
 #endif