mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 11:47:28 +08:00
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
This commit is contained in:
parent
08767a6fcd
commit
3e72ec9a0c
@ -1,3 +1,12 @@
|
||||
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>
|
||||
|
||||
* lang-specs.h: Remove -ansi.
|
||||
|
@ -3402,12 +3402,9 @@ duplicate_decls (newdecl, olddecl)
|
||||
if (DECL_INITIAL (DECL_TEMPLATE_RESULT (olddecl)) == NULL_TREE
|
||||
&& DECL_INITIAL (DECL_TEMPLATE_RESULT (newdecl)) != NULL_TREE)
|
||||
{
|
||||
DECL_SOURCE_LINE (olddecl)
|
||||
= DECL_SOURCE_LINE (DECL_TEMPLATE_RESULT (olddecl))
|
||||
= DECL_SOURCE_LINE (newdecl);
|
||||
DECL_SOURCE_FILE (olddecl)
|
||||
= DECL_SOURCE_FILE (DECL_TEMPLATE_RESULT (olddecl))
|
||||
= DECL_SOURCE_FILE (newdecl);
|
||||
DECL_SOURCE_LOCATION (olddecl)
|
||||
= DECL_SOURCE_LOCATION (DECL_TEMPLATE_RESULT (olddecl))
|
||||
= DECL_SOURCE_LOCATION (newdecl);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@ -3478,8 +3475,7 @@ duplicate_decls (newdecl, olddecl)
|
||||
&& DECL_INITIAL (olddecl) != NULL_TREE)
|
||||
{
|
||||
DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
|
||||
DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl);
|
||||
DECL_SOURCE_LINE (newdecl) = DECL_SOURCE_LINE (olddecl);
|
||||
DECL_SOURCE_LOCATION (newdecl) = DECL_SOURCE_LOCATION (olddecl);
|
||||
if (CAN_HAVE_FULL_LANG_DECL_P (newdecl)
|
||||
&& DECL_LANG_SPECIFIC (newdecl)
|
||||
&& DECL_LANG_SPECIFIC (olddecl))
|
||||
|
@ -129,8 +129,7 @@ update_cloned_parm (parm, cloned_parm)
|
||||
|
||||
/* The name may have changed from the declaration. */
|
||||
DECL_NAME (cloned_parm) = DECL_NAME (parm);
|
||||
DECL_SOURCE_FILE (cloned_parm) = DECL_SOURCE_FILE (parm);
|
||||
DECL_SOURCE_LINE (cloned_parm) = DECL_SOURCE_LINE (parm);
|
||||
DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
|
||||
}
|
||||
|
||||
/* FN is a function that has a complete body. Clone the body as
|
||||
@ -164,8 +163,7 @@ maybe_clone_body (fn)
|
||||
splay_tree decl_map;
|
||||
|
||||
/* Update CLONE's source position information to match FN's. */
|
||||
DECL_SOURCE_FILE (clone) = DECL_SOURCE_FILE (fn);
|
||||
DECL_SOURCE_LINE (clone) = DECL_SOURCE_LINE (fn);
|
||||
DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);
|
||||
DECL_INLINE (clone) = DECL_INLINE (fn);
|
||||
DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);
|
||||
DECL_COMDAT (clone) = DECL_COMDAT (fn);
|
||||
|
10
gcc/cp/pt.c
10
gcc/cp/pt.c
@ -4215,10 +4215,8 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
|
||||
type_decl = create_implicit_typedef (DECL_NAME (template), t);
|
||||
DECL_CONTEXT (type_decl) = TYPE_CONTEXT (t);
|
||||
TYPE_STUB_DECL (t) = type_decl;
|
||||
DECL_SOURCE_FILE (type_decl)
|
||||
= DECL_SOURCE_FILE (TYPE_STUB_DECL (template_type));
|
||||
DECL_SOURCE_LINE (type_decl)
|
||||
= DECL_SOURCE_LINE (TYPE_STUB_DECL (template_type));
|
||||
DECL_SOURCE_LOCATION (type_decl)
|
||||
= DECL_SOURCE_LOCATION (TYPE_STUB_DECL (template_type));
|
||||
}
|
||||
else
|
||||
type_decl = TYPE_NAME (t);
|
||||
@ -10363,8 +10361,8 @@ tsubst_enum (tag, newtag, args)
|
||||
}
|
||||
|
||||
finish_enum (newtag);
|
||||
DECL_SOURCE_LINE (TYPE_NAME (newtag)) = DECL_SOURCE_LINE (TYPE_NAME (tag));
|
||||
DECL_SOURCE_FILE (TYPE_NAME (newtag)) = DECL_SOURCE_FILE (TYPE_NAME (tag));
|
||||
DECL_SOURCE_LOCATION (TYPE_NAME (newtag))
|
||||
= DECL_SOURCE_LOCATION (TYPE_NAME (tag));
|
||||
}
|
||||
|
||||
/* 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_,
|
||||
position so we can get reasonable debugging information, and
|
||||
register the return variable as its equivalent. */
|
||||
DECL_NAME (var) = DECL_NAME (nrv);
|
||||
DECL_SOURCE_FILE (var) = DECL_SOURCE_FILE (nrv);
|
||||
DECL_SOURCE_LINE (var) = DECL_SOURCE_LINE (nrv);
|
||||
DECL_SOURCE_LOCATION (var) = DECL_SOURCE_LOCATION (nrv);
|
||||
DECL_ABSTRACT_ORIGIN (var) = DECL_ORIGIN (nrv);
|
||||
/* Don't lose initialization info. */
|
||||
DECL_INITIAL (var) = DECL_INITIAL (nrv);
|
||||
|
Loading…
Reference in New Issue
Block a user