diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_union_branch.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_union_branch.cpp | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/TAO/TAO_IDL/be/be_union_branch.cpp b/TAO/TAO_IDL/be/be_union_branch.cpp index 71c9cc6e445..9e5a934b76b 100644 --- a/TAO/TAO_IDL/be/be_union_branch.cpp +++ b/TAO/TAO_IDL/be/be_union_branch.cpp @@ -19,11 +19,17 @@ // // ============================================================================ -#include "idl.h" -#include "idl_extern.h" -#include "be.h" - -ACE_RCSID(be, be_union_branch, "$Id$") +#include "be_union_branch.h" +#include "be_union.h" +#include "be_type.h" +#include "be_enum.h" +#include "be_visitor.h" +#include "be_helper.h" +#include "ast_union_label.h" + +ACE_RCSID (be, + be_union_branch, + "$Id$") be_union_branch::be_union_branch (void) { @@ -45,27 +51,6 @@ be_union_branch::be_union_branch (UTL_LabelList *ll, { } -// Compute the size type of the node in question. -int -be_union_branch::compute_size_type (void) -{ - be_type *type = be_type::narrow_from_decl (this->field_type ()); - - if (type == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_field::compute_size_type - " - "bad field type\n"), - -1); - } - - // Our size type is the same as our type. - // As a side effect will also update the size type of parent. - this->size_type (type->size_type ()); - - return 0; -} - int be_union_branch::gen_label_value (TAO_OutStream *os, unsigned long index) { @@ -161,7 +146,7 @@ be_union_branch::gen_default_label_value (TAO_OutStream *os, case AST_Expression::EV_bool: *os << dv.u.bool_val; break; - case AST_Expression::EV_any: + case AST_Expression::EV_enum: // The discriminant is an enum. Some compilers will // not accept a numeric value assigned to this // discriminant, so we must generate the string name. |