summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
index 7752e68912a..bb24a94bec1 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
@@ -50,7 +50,14 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
-1);
}
- if (node->cli_hdr_gen () || node->imported ())
+ // We don't check cli_hdr_gen() here. If we are generated more
+ // than once as an anonymous sequence, the name guard will cause
+ // the C++ preprocessor to catch it. If we are generated more than
+ // once as a typedef (caused by a comma separated list of
+ // typedefs), our name will be changed by the call above and the
+ // name guard will not catch it, but that's ok - we want to
+ // be generated for each typedef.
+ if (node->imported ())
{
return 0;
}
@@ -99,6 +106,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
*os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
<< "// " << __FILE__ << ":" << __LINE__;
+
os->gen_ifdef_macro (node->flat_name ());
if (this->ctx_->tdef () != 0)