diff dmd/aggregate.h @ 73:b706170e24a9 trunk

[svn r77] Fixed foreach on slice. Fixed some nested function problems when accessing outer function parameters. Major changes to handling of structs. Initial support for unions. Probably more...
author lindquist
date Wed, 31 Oct 2007 03:11:32 +0100
parents d7e764e62462
children 714057ff2dbb
line wrap: on
line diff
--- a/dmd/aggregate.h	Mon Oct 29 03:28:12 2007 +0100
+++ b/dmd/aggregate.h	Wed Oct 31 03:11:32 2007 +0100
@@ -19,6 +19,8 @@
 #include "dsymbol.h"
 
 #include <vector>
+#include <set>
+#include <map>
 
 struct Identifier;
 struct Type;
@@ -101,7 +103,8 @@
     llvm::Constant* llvmVtbl;
     llvm::ConstantStruct* llvmConstVtbl;
     llvm::Constant* llvmInitZ;
-    virtual void offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result); // converts a DMD field offsets to LLVM struct index vector
+    bool llvmHasUnions;
+    virtual size_t offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result); // converts a DMD field offsets to LLVM struct index vector
 
     AggregateDeclaration *isAggregateDeclaration() { return this; }
 };
@@ -237,7 +240,7 @@
 
     Symbol *vtblsym;
 
-    virtual void offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result);
+    virtual size_t offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result);
 
     ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
 };