comparison ir/irstruct.h @ 140:ffcc9a2f3d9d trunk

[svn r144] fixes
author lindquist
date Wed, 23 Jan 2008 12:56:09 +0100
parents ce7b81fb957f
children a123dca8349b
comparison
equal deleted inserted replaced
139:0ab29b838084 140:ffcc9a2f3d9d
40 40
41 Offset(VarDeclaration* v, const llvm::Type* ty) 41 Offset(VarDeclaration* v, const llvm::Type* ty)
42 : var(v), type(ty), init(NULL) {} 42 : var(v), type(ty), init(NULL) {}
43 }; 43 };
44 44
45 struct InterCmp
46 {
47 bool operator()(ClassDeclaration* lhs, ClassDeclaration* rhs) const
48 {
49 return strcmp(lhs->toPrettyChars(), rhs->toPrettyChars()) < 0;
50 }
51 };
52
45 typedef std::multimap<unsigned, Offset> OffsetMap; 53 typedef std::multimap<unsigned, Offset> OffsetMap;
46 typedef std::vector<VarDeclaration*> VarDeclVector; 54 typedef std::vector<VarDeclaration*> VarDeclVector;
47 typedef std::map<ClassDeclaration*, IrInterface*> InterfaceMap; 55 typedef std::map<ClassDeclaration*, IrInterface*, InterCmp> InterfaceMap;
48 typedef InterfaceMap::iterator InterfaceIter; 56 typedef InterfaceMap::iterator InterfaceIter;
49 57
50 public: 58 public:
51 IrStruct(Type*); 59 IrStruct(Type*);
52 virtual ~IrStruct(); 60 virtual ~IrStruct();