I noticed type::stub_is_supported the other day. It is only set in a
single spot in the DWARF reader. And looking at this, the logic seems
backward or confused to me.
That is, a type is opaque if a bunch of conditions are met (earlier in
the method), and then either the type is marked as a stub, or else the
type does not have the stub_is_supported flag set.
However the DWARF reader essentially does this:
if (something)
type->set_is_stub (true);
else
type->set_stub_is_supported (true);
That is, either one flag or the other is going to be true along this
path.
So maybe this was a workaround for some other reader that doesn't set
the flag. Luckily, most of the other readers were removed. Checking
the CTF reader, it seems to correctly set the stub flag for incomplete
types.
So, I think the stub_is_supported machinery can simply be removed now.