> prune_unused_types marks everything in the pubnames_table. If the
> enumerators go in the pubname table (but the enum itself goes in the
> pubtype table), then the unused enum becomes reachable from the
> pubnames table.
>
> The least complicated solution is to put them back in the
> pubtypes_table. I could also defer adding them until after types are
> pruned, I guess.
>
> One somewhat unsatisfying way to rationalize it in my mind is to say
> that as fields are to structs, so are enumerators to enums.

It doesn't matter much to me -- it was working with enumerators in the
pubtypes table, as far as I can tell.

But if the consensus turns out to be that enumerators should be in
pubnames, wouldn't it also be fairly easy to change prune_unused_types
so that it doesn't mark enumerators, and change output_pubnames to
skip enumerators that have been pruned?

-cary

Reply via email to