Add a C++ backend for LibertyXDR

Also change the C backend so that it also de/serializes
unions without any other fields besides the tag.
This commit is contained in:
2023-07-07 12:25:14 +02:00
parent f78f8a70f1
commit 2edc9c6fd1
13 changed files with 638 additions and 12 deletions

View File

@@ -232,7 +232,7 @@ function defunion( name, tag, tagtype, tagvalue, cg, scg, d, a, i,
if (Types[tagtype] != "enum")
fatal("not an enum type: " tagtype)
codegen_union_tag(tag, cg)
codegen_union_tag(name, tag, cg)
split(EnumValues[tagtype], a, SUBSEP)
for (i in a)