diff ir/irstruct.h @ 193:aca17e55b7a5 trunk

[svn r209] Fixed: exotic array to pointer casts were broken. Changed: classes now have opaque vtables.
author lindquist
date Mon, 12 May 2008 18:44:11 +0200
parents a123dca8349b
children ba47ac346ddd
line wrap: on
line diff
--- a/ir/irstruct.h	Mon May 12 18:22:55 2008 +0200
+++ b/ir/irstruct.h	Mon May 12 18:44:11 2008 +0200
@@ -11,8 +11,13 @@
     BaseClass* base;
     ClassDeclaration* decl;
 
+#if OPAQUE_VTBLS
+    const llvm::ArrayType* vtblTy;
+    llvm::ConstantArray* vtblInit;
+#else
     const llvm::StructType* vtblTy;
     llvm::ConstantStruct* vtblInit;
+#endif
     llvm::GlobalVariable* vtbl;
 
     const llvm::StructType* infoTy;
@@ -21,7 +26,11 @@
 
     int index;
 
+#if OPAQUE_VTBLS
+    IrInterface(BaseClass* b, const llvm::ArrayType* vt);
+#else
     IrInterface(BaseClass* b, const llvm::StructType* vt);
+#endif
     ~IrInterface();
 };
 
@@ -67,7 +76,11 @@
     bool constinited;
 
     llvm::GlobalVariable* vtbl;
+#if OPAQUE_VTBLS
+    llvm::ConstantArray* constVtbl;
+#else
     llvm::ConstantStruct* constVtbl;
+#endif
     llvm::GlobalVariable* init;
     llvm::Constant* constInit;
     llvm::GlobalVariable* classInfo;