Since maps have a different in-memory representation than repeated messages, it is not safe to tree shake map entry messages. Specifically, map fields use `kUpb_FieldMode_Map` instead of `kUpb_FieldMode_Array`, and there is no easy way to get the linker to rewrite this when the map entry is dropped. However it is safe to tree shake message typed map values, since these use `kUpb_FieldMode_Scalar`, which remains valid even after the type is tree shaken. PiperOrigin-RevId: 646199050pull/17215/head
parent
6429885156
commit
69a1888fd5
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue