diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-05-08 07:35:47 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-05-08 07:35:47 +0000 |
commit | 2e4392a220c8d1249892135992d47b4363a15fc2 (patch) | |
tree | 4b7550ece637d2607bedfb50dbd9d077270f5b4b | |
parent | cf35b1f2a022ff46334de8dd7c549a88bf3d264b (diff) | |
download | ATCD-2e4392a220c8d1249892135992d47b4363a15fc2.tar.gz |
ChangeLogTag:Sun May 8 00:20:50 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp index 46a438ddd2e..5064a9ae6d4 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -625,11 +625,17 @@ be_visitor_typecode_defn::visit_array (be_array *node) // generate typecode for the base type this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); + AST_Decl::NodeType nt = base->node_type (); + bool const anonymous = + nt == AST_Decl::NT_array + || nt == AST_Decl::NT_sequence + || nt == AST_Decl::NT_string; + // Generate typecode for the base type, being careful to avoid doing // so for a typedef since that could recursively cause multiple base // type TypeCode definitions to be generated. - if (!base || (base->node_type () != AST_Decl::NT_typedef - && !base->is_defined () + if (!base || (nt != AST_Decl::NT_typedef + && (anonymous || !base->is_defined ()) && base->accept (this) == -1)) { ACE_ERROR_RETURN ((LM_ERROR, @@ -940,11 +946,17 @@ be_visitor_typecode_defn::visit_sequence (be_sequence * node) // generate typecode for the base type this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); + AST_Decl::NodeType nt = base->node_type (); + bool const anonymous = + nt == AST_Decl::NT_array + || nt == AST_Decl::NT_sequence + || nt == AST_Decl::NT_string; + // Generate typecode for the base type, being careful to avoid doing // so for a typedef since that could recursively cause multiple base // type TypeCode definitions to be generated. - if (!base || (base->node_type () != AST_Decl::NT_typedef - && !base->is_defined () + if (!base || (nt != AST_Decl::NT_typedef + && (anonymous || !base->is_defined ()) && base->accept (this) == -1)) { ACE_ERROR_RETURN ((LM_ERROR, |