bazel /
crubit /
1221c2a5739adc74f59c464e537cdfb98fd391f7 Compute the space occupied by bases, vptr, etc. based on offset of first field.
This amounts to giving up: rather than enumerating each source of data, we just check the offset of the first field (or end of the array). I did it this way because, best as I can tell, ASTRecordLayout does not export information about vtable pointers except whether one exists or not -- so, for example, it doesn't say how many there are. It's simpler and unifying for several cases to simply write down an opaque thunk. This also unifies the logic with the empty struct / sizeof one case, though really that might be a bad thing, as it prevents us from making the field public.
We do still need to e.g. check that any base classes exist at all, in order to decide whether there must be a private field.
PiperOrigin-RevId: 446904649
17 files changed