diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-03-22 18:58:41 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-03-22 18:58:41 +0000 |
commit | aee4f452d012f98de2ae0d8cf3e4988b64ae9b3c (patch) | |
tree | eb543d5185eab88e584f653b08cb97d8f2be3f46 | |
parent | 41f5f4e6460461f540797ce816adc35fb845df59 (diff) | |
download | ATCD-aee4f452d012f98de2ae0d8cf3e4988b64ae9b3c.tar.gz |
ChangeLogTag: Sat Mar 22 12:55:16 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp | 29 |
2 files changed, 29 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a997ea45850..3ed16285a88 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Sat Mar 22 12:55:16 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * orbsvcs/IFR_Service/ifr_adding_visitor.cpp: + + Changed loading of constant into the repository to be aware + if the constant's type is a typedef. + Sat Mar 22 07:41:59 2003 Phil Mesnier <mesnier_p@ociweb.com> * performance-tests/Cubit/TAO/Makefile: Add .NOTPARALLEL to the diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp index 23f291d3d50..c13c80e18d0 100644 --- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp +++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp @@ -974,16 +974,31 @@ ifr_adding_visitor::visit_constant (AST_Constant *node) } AST_Expression::AST_ExprValue *ev = node->constant_value ()->ev (); + AST_Decl *td = ev->tdef; - CORBA::PrimitiveKind pkind = this->expr_type_to_pkind (ev->et); - - CORBA::IDLType_var idl_type = - be_global->repository ()->get_primitive (pkind + if (td != 0 && td->node_type () == AST_Decl::NT_typedef) + { + // This constant's type is a typedef - look up the typedef to + // pass to create_constant(). + CORBA::Contained_var contained = + be_global->repository ()->lookup_id (td->repoID () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ACE_TRY_CHECK; - CORBA::Any any; + this->ir_current_ = CORBA::IDLType::_narrow (contained.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + else + { + CORBA::PrimitiveKind pkind = this->expr_type_to_pkind (ev->et); + this->ir_current_ = + be_global->repository ()->get_primitive (pkind + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + CORBA::Any any; this->load_any (ev, any); @@ -996,7 +1011,7 @@ ifr_adding_visitor::visit_constant (AST_Constant *node) id, node->local_name ()->get_string (), node->version (), - idl_type.in (), + this->ir_current_.in (), any ACE_ENV_ARG_PARAMETER ); |