diff dmd/expression.h @ 599:4435f57956e7

Fixed .funcptr property of delegates, no longer uses the infamous DMD rewrites to pointer arithmetic, instead a GEPExp has been introduced.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 15 Sep 2008 02:04:26 +0200
parents 870652a9af23
children 722630261d62
line wrap: on
line diff
--- a/dmd/expression.h	Sun Sep 14 22:49:19 2008 +0200
+++ b/dmd/expression.h	Mon Sep 15 02:04:26 2008 +0200
@@ -1496,6 +1496,26 @@
 
 /****************************************************************/
 
+#if IN_LLVM
+
+// this stuff is strictly LLVMDC
+
+struct GEPExp : UnaExp
+{
+    unsigned index;
+    Identifier* ident;
+
+    GEPExp(Loc loc, Expression* e, Identifier* id, unsigned idx);
+    void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
+    Expression *toLvalue(Scope *sc, Expression *e);
+
+    elem *toElem(IRState *irs);
+};
+
+#endif
+
+/****************************************************************/
+
 /* Special values used by the interpreter
  */
 #define EXP_CANT_INTERPRET	((Expression *)1)