diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-22 20:51:36 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-22 20:51:36 +0000 |
commit | 9e57081579edc030b5aea594023580e5c16040b9 (patch) | |
tree | 60ba2e55f7ffe023c003cf006da885fa63ba9421 /TAO/TAO_IDL | |
parent | 937c8ba6ed6fe577b01641a8ae180e75aecbf075 (diff) | |
download | ATCD-9e57081579edc030b5aea594023580e5c16040b9.tar.gz |
Fix to handle modules reopened by a chain of #includes.
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/be/be_generator.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp index 6a32ddb9665..bcc5f8d72c7 100644 --- a/TAO/TAO_IDL/be/be_generator.cpp +++ b/TAO/TAO_IDL/be/be_generator.cpp @@ -146,9 +146,11 @@ be_generator::create_module (UTL_Scope *s, // supposed to create. if (d->local_name ()->compare (n->last_component ())) { - // If it's not from an included file, then return - // the one the iterator found. - if (!d->imported ()) + // If the node in our scope and the one being created + // are either both #included or both not #included, just + // return the node from the scope and continue adding + // members to it as they're parsed. + if (d->imported () == idl_global->imported ()) { delete iter; delete retval; @@ -156,6 +158,11 @@ be_generator::create_module (UTL_Scope *s, } else { + // The node in our scope is #included (note that + // because of the above case there will be only + // one), but the one being created is not. We add + // the #included module's members to the new node + // and return it. UTL_ScopeActiveIterator *i = new UTL_ScopeActiveIterator (DeclAsScope (d), UTL_Scope::IK_decls); |