summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-12-08 03:22:41 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-12-08 03:22:41 +0000
commitbca2bc8b00b143e935134cb87f6b5d01d4da38f4 (patch)
treedcb0e2947e2dd2dbe4b2d989b1fa83e3afefb9fe
parenteda0757d42cc9404b2c047fe26dee5a9491a4b3b (diff)
downloadATCD-bca2bc8b00b143e935134cb87f6b5d01d4da38f4.tar.gz
ChangeLogTag: Wed Dec 8 03:13:28 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog8
-rw-r--r--TAO/TAO_IDL/fe/fe_utils.cpp15
2 files changed, 21 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 094cc2c7a71..f48b43a2f5e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,11 @@
+Wed Dec 8 03:13:28 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/fe/fe_utils.cpp(can_be_redefined):
+
+ Modified the method to return 'false' if either of its 2
+ arguments is a template module. Such a return will
+ cause a redefinition error to be output.
+
Tue Dec 7 22:10:52 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_codegen.cpp:
diff --git a/TAO/TAO_IDL/fe/fe_utils.cpp b/TAO/TAO_IDL/fe/fe_utils.cpp
index 4114e9fe472..892a9ce5a28 100644
--- a/TAO/TAO_IDL/fe/fe_utils.cpp
+++ b/TAO/TAO_IDL/fe/fe_utils.cpp
@@ -10,6 +10,7 @@
#include "ast_structure.h"
#include "ast_valuetype.h"
#include "ast_sequence.h"
+#include "ast_template_module.h"
#include "global_extern.h"
@@ -839,6 +840,8 @@ FE_Utils::can_be_redefined (AST_Decl *prev_decl,
AST_StructureFwd *s_fwd = 0;
AST_Interface *i = 0;
AST_InterfaceFwd *i_fwd = 0;
+ AST_Template_Module *ptm = 0;
+ AST_Template_Module *ctm = 0;
bool nt_eq = (pnt == cnt);
bool s_eq = (prev_scope == curr_scope);
@@ -846,8 +849,16 @@ FE_Utils::can_be_redefined (AST_Decl *prev_decl,
switch (pnt)
{
case AST_Decl::NT_module:
- /// Just need to check that both are modules.
- return (cnt == AST_Decl::NT_module);
+ /// Need to check that both are modules.
+ if (cnt != AST_Decl::NT_module)
+ {
+ return false;
+ }
+
+ /// Neither can be a template module.
+ ptm = AST_Template_Module::narrow_from_decl (prev_decl);
+ ctm = AST_Template_Module::narrow_from_decl (curr_decl);
+ return (ptm == 0 && ctm == 0);
/// For the *_fwd types, if scopes aren't related, it's ok.
/// If they are related, then we need another fwd or a full decl.
case AST_Decl::NT_component_fwd: