+/* * Information needed for a discriminated union. A discriminated
+ union is handled somewhat differently from an ordinary union.
+
+ One field is designated as the discriminant. Only one other field
+ is active at a time; which one depends on the value of the
+ discriminant and the data in this structure.
+
+ Additionally, it is possible to have a univariant discriminated
+ union. In this case, the union has just a single field, which is
+ assumed to be the only active variant -- in this case no
+ discriminant is provided. */
+
+struct discriminant_info
+{
+ /* * The index of the discriminant field. If -1, then this union
+ must have just a single field. */
+
+ int discriminant_index;
+
+ /* * The index of the default branch of the union. If -1, then
+ there is no default branch. */
+
+ int default_index;
+
+ /* * The discriminant values corresponding to each branch. This has
+ a number of entries equal to the number of fields in this union.
+ If discriminant_index is not -1, then that entry in this array is
+ not used. If default_index is not -1, then that entry in this
+ array is not used. */
+
+ ULONGEST discriminants[1];
+};
+