+struct field *
+struct_get_field_from_index(struct declaration_struct *struct_declaration,
+ unsigned long index);
+
+/*
+ * The tag enumeration is validated to ensure that it contains only mappings
+ * from numeric values to a single tag. Overlapping tag value ranges are
+ * therefore forbidden.
+ */
+struct type_variant *variant_type_new(const char *name);
+void variant_type_add_field(struct type_variant *variant_type,
+ const char *tag_name, struct type *tag_type);
+struct type_field *
+variant_type_get_field_from_tag(struct type_variant *variant_type, GQuark tag);
+/*
+ * Returns 0 on success, -EPERM on error.
+ */
+int variant_declaration_set_tag(struct declaration_variant *variant,
+ struct declaration *enum_tag);
+/*
+ * Returns the field selected by the current tag value.
+ * field returned only valid as long as the variant structure is not appended
+ * to.
+ */
+struct field *
+variant_get_current_field(struct declaration_variant *variant);