You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constant names emitted for enum elements end up quite unwieldy. They are
prefixed with enum name because in C struct, union and enum names are in
a separate namespace, allowing for overlaps with identifiers, e.g:
enum E { E };
While such overlaps are possible in *theory*, people usually don't do
it. If a typicall C naming convention is followed, we get
enum something {
SOMETHING_FOO, SOMETHING_BAR
};
generating <STEM>SomethingSOMETHING_FOO and <STEM>SomethingSOMETHING_BAR.
In addition to "safe" long names, generate shorter ones if the
respective name is not taken. <STEM>SOMETHING_FOO and
<STEM>SOMETHING_BAR are much nicer to work with.
Signed-off-by: Nick Zavaritsky <[email protected]>
0 commit comments