MATE
MATE copied to clipboard
DWARF nodes: APIs for common type derivations
Right now, if you have a DWARFType
foo
and you want to get some of its common derivations (e.g. foo *
, const foo *
), you need to jump through some hoops:
next(typ for typ in foo.deriving_types if typ.is_pointer)
next(typ for typ in foo.deriving_types if typ.is_const)
This becomes especially annoying when you want multiple levels of derivation. Instead, we should support APIs like these:
# foo -> const foo *
foo.const_of.pointer_of