[fidlc] Unique-ify nullable types in coding tables
Prior to this, if you had multiple references to a nullable xunion in the flat AST, it would include multiple copies of that xunion in the list of coded types. Since the list of coded types is directly used to generate xunion declarations (see TablesGenerator::Produce), it could emit multiple versions of the same nullable xunion into the C generated code, leading to compilation failure. Also applies the same logic to nullable structs and unions, although they don't have the same failure mode. Change-Id: I840beaa607f390a9ec7e685d6c0e37477445d657
Showing
- zircon/system/host/fidl/include/fidl/coded_types_generator.h 3 additions, 0 deletionszircon/system/host/fidl/include/fidl/coded_types_generator.h
- zircon/system/host/fidl/lib/coded_types_generator.cpp 15 additions, 0 deletionszircon/system/host/fidl/lib/coded_types_generator.cpp
- zircon/system/utest/fidl-coding-tables/coding_tables.test.fidl 3 additions, 0 deletions...n/system/utest/fidl-coding-tables/coding_tables.test.fidl
- zircon/system/utest/fidl-compiler/coded_types_generator_tests.cpp 58 additions, 1 deletion...ystem/utest/fidl-compiler/coded_types_generator_tests.cpp
Loading
Please register or sign in to comment