This is incomplete/too verbose. Even if the enum constant is used in a
header (to declare the size of an array member of a type that's never
used, or in an inline function never called).
This could be fixed by keeping a chain of references "this enum is
referenced from this type which is referenced from this type, used in
this inline function, etc..." which is a substantial undertaking, though
it would help power several other debug info correctness/optimizations.
(eg: struct foo { ... }; .... void *f; ((foo*)f)->x currently doesn't
emit the definition of 'foo', but we could keep track of the fact that
foo was referenced from that expression, etc)