aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@markmitchell.com>1998-09-10 10:46:00 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1998-09-10 10:46:00 +0000
commit02e24c7ab0cc632fefb621ae3dbce2a2a05dbc3c (patch)
treede9738c2acffbfb708c950c2f7ba7a0d60650a14 /gcc/dwarf2out.c
parent76f42086770774e0584495b4613cf360a0759c3f (diff)
downloadgcc-02e24c7ab0cc632fefb621ae3dbce2a2a05dbc3c.zip
gcc-02e24c7ab0cc632fefb621ae3dbce2a2a05dbc3c.tar.gz
gcc-02e24c7ab0cc632fefb621ae3dbce2a2a05dbc3c.tar.bz2
tree.h (DECL_ORIGIN): New macro.
* tree.h (DECL_ORIGIN): New macro. * integrate.c (copy_and_set_decl_abstract_origin): New function. (copy_decl_list): Use it. (integrate_parm_decls): Likewise. (integrate_decl_tree): Likewise. * dwarf2out.c (decl_ultimate_origin): Simplify. * dwarfout.c (decl_ultimate_origin): Likewise. * c-decl.c (duplicate_decls): Use DECL_ORIGIN. (pushdecl): Likewise. From-SVN: r22380
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index e3acb98..d768320 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3539,24 +3539,14 @@ static tree
decl_ultimate_origin (decl)
register tree decl;
{
- register tree immediate_origin = DECL_ABSTRACT_ORIGIN (decl);
-
- if (immediate_origin == NULL_TREE)
- return NULL_TREE;
- else
- {
- register tree ret_val;
- register tree lookahead = immediate_origin;
-
- do
- {
- ret_val = lookahead;
- lookahead = DECL_ABSTRACT_ORIGIN (ret_val);
- }
- while (lookahead != NULL && lookahead != ret_val);
+#ifdef ENABLE_CHECKING
+ if (DECL_FROM_INLINE (DECL_ORIGIN (decl)))
+ /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the
+ most distant ancestor, this should never happen. */
+ abort ();
+#endif
- return ret_val;
- }
+ return DECL_ABSTRACT_ORIGIN (decl);
}
/* Determine the "ultimate origin" of a block. The block may be an inlined
@@ -9432,7 +9422,7 @@ dwarf2out_decl (decl)
if (DECL_IGNORED_P (decl))
{
if (TREE_CODE (decl) == FUNCTION_DECL
- && DECL_INITIAL (decl) != NULL)
+ && DECL_INITIAL (decl) != NULL)
abort ();
return;