1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

LibDebug: Dont copy an AbbreviationEntry every time we retrieve a value

These API's are used in a variety of ways when building the die cache.
Each AbbreviationEntry has vector and other members, so avoid copying
it at all costs.
This commit is contained in:
Brian Gianforcaro 2021-09-17 02:22:34 -07:00 committed by Andreas Kling
parent 952441943f
commit c5cdb6eb4c
3 changed files with 13 additions and 11 deletions

View file

@ -20,14 +20,12 @@ public:
AbbreviationsMap(DwarfInfo const& dwarf_info, u32 offset);
struct AbbreviationEntry {
EntryTag tag;
bool has_children;
Vector<AttributeSpecification> attribute_specifications;
};
Optional<AbbreviationEntry> get(u32 code) const;
AbbreviationEntry const* get(u32 code) const;
private:
void populate_map();