2 * Copyright 2013, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
9 #include <ObjectList.h>
18 class TypeUnit
: public BaseUnit
{
20 TypeUnit(off_t headerOffset
,
23 off_t abbreviationOffset
,
30 uint64
Signature() const { return fSignature
; }
32 off_t
TypeOffset() const { return fTypeOffset
; }
35 DIETypeUnit
* UnitEntry() const { return fUnitEntry
; }
36 void SetUnitEntry(DIETypeUnit
* entry
);
38 DebugInfoEntry
* TypeEntry() const;
39 void SetTypeEntry(DebugInfoEntry
* entry
);
41 virtual dwarf_unit_kind
Kind() const;
44 DIETypeUnit
* fUnitEntry
;
45 DebugInfoEntry
* fTypeEntry
;
51 struct TypeUnitTableEntry
{
54 TypeUnitTableEntry
* next
;
56 TypeUnitTableEntry(uint64 signature
, TypeUnit
* unit
)
65 struct TypeUnitTableHashDefinition
{
66 typedef uint64 KeyType
;
67 typedef TypeUnitTableEntry ValueType
;
69 size_t HashKey(uint64 key
) const
74 size_t Hash(TypeUnitTableEntry
* value
) const
76 return HashKey(value
->signature
);
79 bool Compare(uint64 key
, TypeUnitTableEntry
* value
) const
81 return value
->signature
== key
;
84 TypeUnitTableEntry
*& GetLink(TypeUnitTableEntry
* value
) const