Commit 3e72ec9a by Gabriel Dos Reis Committed by Gabriel Dos Reis

decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.

	* decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
	DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
	* optimize.c (maybe_clone_body): Likewise.
	* pt.c (tsubst_enum): Likewise.
	(lookup_template_class): Likewise.
	* tree.c (cp_copy_res_decl_for_inlining): Likewise.

From-SVN: r56206
parent 08767a6f
2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
* decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
* optimize.c (maybe_clone_body): Likewise.
* pt.c (tsubst_enum): Likewise.
(lookup_template_class): Likewise.
* tree.c (cp_copy_res_decl_for_inlining): Likewise.
2002-08-10 Neil Booth <neil@daikokuya.co.uk> 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
* lang-specs.h: Remove -ansi. * lang-specs.h: Remove -ansi.
......
...@@ -3402,12 +3402,9 @@ duplicate_decls (newdecl, olddecl) ...@@ -3402,12 +3402,9 @@ duplicate_decls (newdecl, olddecl)
if (DECL_INITIAL (DECL_TEMPLATE_RESULT (olddecl)) == NULL_TREE if (DECL_INITIAL (DECL_TEMPLATE_RESULT (olddecl)) == NULL_TREE
&& DECL_INITIAL (DECL_TEMPLATE_RESULT (newdecl)) != NULL_TREE) && DECL_INITIAL (DECL_TEMPLATE_RESULT (newdecl)) != NULL_TREE)
{ {
DECL_SOURCE_LINE (olddecl) DECL_SOURCE_LOCATION (olddecl)
= DECL_SOURCE_LINE (DECL_TEMPLATE_RESULT (olddecl)) = DECL_SOURCE_LOCATION (DECL_TEMPLATE_RESULT (olddecl))
= DECL_SOURCE_LINE (newdecl); = DECL_SOURCE_LOCATION (newdecl);
DECL_SOURCE_FILE (olddecl)
= DECL_SOURCE_FILE (DECL_TEMPLATE_RESULT (olddecl))
= DECL_SOURCE_FILE (newdecl);
} }
return 1; return 1;
...@@ -3478,8 +3475,7 @@ duplicate_decls (newdecl, olddecl) ...@@ -3478,8 +3475,7 @@ duplicate_decls (newdecl, olddecl)
&& DECL_INITIAL (olddecl) != NULL_TREE) && DECL_INITIAL (olddecl) != NULL_TREE)
{ {
DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl); DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl); DECL_SOURCE_LOCATION (newdecl) = DECL_SOURCE_LOCATION (olddecl);
DECL_SOURCE_LINE (newdecl) = DECL_SOURCE_LINE (olddecl);
if (CAN_HAVE_FULL_LANG_DECL_P (newdecl) if (CAN_HAVE_FULL_LANG_DECL_P (newdecl)
&& DECL_LANG_SPECIFIC (newdecl) && DECL_LANG_SPECIFIC (newdecl)
&& DECL_LANG_SPECIFIC (olddecl)) && DECL_LANG_SPECIFIC (olddecl))
......
...@@ -129,8 +129,7 @@ update_cloned_parm (parm, cloned_parm) ...@@ -129,8 +129,7 @@ update_cloned_parm (parm, cloned_parm)
/* The name may have changed from the declaration. */ /* The name may have changed from the declaration. */
DECL_NAME (cloned_parm) = DECL_NAME (parm); DECL_NAME (cloned_parm) = DECL_NAME (parm);
DECL_SOURCE_FILE (cloned_parm) = DECL_SOURCE_FILE (parm); DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
DECL_SOURCE_LINE (cloned_parm) = DECL_SOURCE_LINE (parm);
} }
/* FN is a function that has a complete body. Clone the body as /* FN is a function that has a complete body. Clone the body as
...@@ -164,8 +163,7 @@ maybe_clone_body (fn) ...@@ -164,8 +163,7 @@ maybe_clone_body (fn)
splay_tree decl_map; splay_tree decl_map;
/* Update CLONE's source position information to match FN's. */ /* Update CLONE's source position information to match FN's. */
DECL_SOURCE_FILE (clone) = DECL_SOURCE_FILE (fn); DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);
DECL_SOURCE_LINE (clone) = DECL_SOURCE_LINE (fn);
DECL_INLINE (clone) = DECL_INLINE (fn); DECL_INLINE (clone) = DECL_INLINE (fn);
DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn); DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);
DECL_COMDAT (clone) = DECL_COMDAT (fn); DECL_COMDAT (clone) = DECL_COMDAT (fn);
......
...@@ -4215,10 +4215,8 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain) ...@@ -4215,10 +4215,8 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
type_decl = create_implicit_typedef (DECL_NAME (template), t); type_decl = create_implicit_typedef (DECL_NAME (template), t);
DECL_CONTEXT (type_decl) = TYPE_CONTEXT (t); DECL_CONTEXT (type_decl) = TYPE_CONTEXT (t);
TYPE_STUB_DECL (t) = type_decl; TYPE_STUB_DECL (t) = type_decl;
DECL_SOURCE_FILE (type_decl) DECL_SOURCE_LOCATION (type_decl)
= DECL_SOURCE_FILE (TYPE_STUB_DECL (template_type)); = DECL_SOURCE_LOCATION (TYPE_STUB_DECL (template_type));
DECL_SOURCE_LINE (type_decl)
= DECL_SOURCE_LINE (TYPE_STUB_DECL (template_type));
} }
else else
type_decl = TYPE_NAME (t); type_decl = TYPE_NAME (t);
...@@ -10363,8 +10361,8 @@ tsubst_enum (tag, newtag, args) ...@@ -10363,8 +10361,8 @@ tsubst_enum (tag, newtag, args)
} }
finish_enum (newtag); finish_enum (newtag);
DECL_SOURCE_LINE (TYPE_NAME (newtag)) = DECL_SOURCE_LINE (TYPE_NAME (tag)); DECL_SOURCE_LOCATION (TYPE_NAME (newtag))
DECL_SOURCE_FILE (TYPE_NAME (newtag)) = DECL_SOURCE_FILE (TYPE_NAME (tag)); = DECL_SOURCE_LOCATION (TYPE_NAME (tag));
} }
/* DECL is a FUNCTION_DECL that is a template specialization. Return /* DECL is a FUNCTION_DECL that is a template specialization. Return
......
...@@ -2289,8 +2289,7 @@ cp_copy_res_decl_for_inlining (result, fn, caller, decl_map_, ...@@ -2289,8 +2289,7 @@ cp_copy_res_decl_for_inlining (result, fn, caller, decl_map_,
position so we can get reasonable debugging information, and position so we can get reasonable debugging information, and
register the return variable as its equivalent. */ register the return variable as its equivalent. */
DECL_NAME (var) = DECL_NAME (nrv); DECL_NAME (var) = DECL_NAME (nrv);
DECL_SOURCE_FILE (var) = DECL_SOURCE_FILE (nrv); DECL_SOURCE_LOCATION (var) = DECL_SOURCE_LOCATION (nrv);
DECL_SOURCE_LINE (var) = DECL_SOURCE_LINE (nrv);
DECL_ABSTRACT_ORIGIN (var) = DECL_ORIGIN (nrv); DECL_ABSTRACT_ORIGIN (var) = DECL_ORIGIN (nrv);
/* Don't lose initialization info. */ /* Don't lose initialization info. */
DECL_INITIAL (var) = DECL_INITIAL (nrv); DECL_INITIAL (var) = DECL_INITIAL (nrv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment