diff ir/irstruct.h @ 142:a123dca8349b trunk

[svn r146] fixed some potential problems with mismatch in order of interfaces in class data layout
author lindquist
date Wed, 23 Jan 2008 15:48:19 +0100
parents ffcc9a2f3d9d
children aca17e55b7a5
line wrap: on
line diff
--- a/ir/irstruct.h	Wed Jan 23 12:58:51 2008 +0100
+++ b/ir/irstruct.h	Wed Jan 23 15:48:19 2008 +0100
@@ -42,18 +42,12 @@
         : var(v), type(ty), init(NULL) {}
     };
 
-    struct InterCmp
-    {
-        bool operator()(ClassDeclaration* lhs, ClassDeclaration* rhs) const
-        {
-            return strcmp(lhs->toPrettyChars(), rhs->toPrettyChars()) < 0;
-        }
-    };
-
     typedef std::multimap<unsigned, Offset> OffsetMap;
     typedef std::vector<VarDeclaration*> VarDeclVector;
-    typedef std::map<ClassDeclaration*, IrInterface*, InterCmp> InterfaceMap;
-    typedef InterfaceMap::iterator InterfaceIter;
+    typedef std::map<ClassDeclaration*, IrInterface*> InterfaceMap;
+    typedef InterfaceMap::iterator InterfaceMapIter;
+    typedef std::vector<IrInterface*> InterfaceVector;
+    typedef InterfaceVector::iterator InterfaceVectorIter;
 
 public:
     IrStruct(Type*);
@@ -64,7 +58,8 @@
     OffsetMap offsets;
     VarDeclVector defaultFields;
 
-    InterfaceMap interfaces;
+    InterfaceMap interfaceMap;
+    InterfaceVector interfaceVec;
     const llvm::ArrayType* interfaceInfosTy;
     llvm::GlobalVariable* interfaceInfos;