For all types, we can safely skip nested nominal types and
typealiases.
For a struct, we only have to look at VarDecls; methods never
affect layout.
Similarly for an enum, only EnumElementDecls matter.
For a class, we still have to look at all methods and properties.
Ideally, in non-optimized builds we would invoke virtual methods
by calling thunks, and only emit the thunks from the translation
unit containing the class. Then the layout of a class will
only be necessary if you subclass the class.
This should improve compiler scalability in multiple-frontend
mode.