summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
index ab7055faf79..293faaa0236 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp
@@ -50,6 +50,21 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node)
TAO_OutStream *os = this->ctx_->stream ();
+ // First generate code for our children. The reason we do this first is
+ // because the inlined code for our children must be available before we use
+ // it in our parent
+
+ // set the substate as generating code for the types defined in our scope
+ this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_SCOPE);
+ // all we have to do is to visit the scope and generate code
+ if (this->visit_scope (node) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_exception_cdr_op_cs"
+ "::visit_exception - "
+ "codegen for scope failed\n"), -1);
+ }
+
// set the sub state as generating code for the output operator
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
*os << "ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, "
@@ -134,17 +149,6 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node)
<< "return 0;" << be_uidt << be_uidt_nl
<< "}\n\n";
- // set the substate as generating code for the types defined in our scope
- this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_SCOPE);
- // all we have to do is to visit the scope and generate code
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_cdr_op_cs"
- "::visit_exception - "
- "codegen for scope failed\n"), -1);
- }
-
node->cli_stub_cdr_op_gen (1);
return 0;
}