SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

Include the enum constant names in the debug string output.

The specific format is something which you could more easily copy-paste back into a test, either:
`SomeEnumName::CorrespondingNamedConstant` or
`SomeEnumName::from(someint)` for open enums with an unrecognized value.

For now this is emitting the string literals for the names in a generated match statement in .rs; this makes it work for both cpp and upb kernels, as well as hopefully reduces bloat if there is no cross-language lto.

At a future time we could consider calling into C++ to get the enum names there, which is a more optimized path and could reduce having the names in the binary twice in some cases.

PiperOrigin-RevId: 705910092
P
Protobuf Team Bot committed
45ee584e6c0e0e31286fe77ef1b20aadd8af5c94
Parent: bce20aa
Committed by Copybara-Service <copybara-worker@google.com> on 12/13/2024, 5:38:49 PM