diff options
author | Mark Mitchell <mark@markmitchell.com> | 1998-09-10 10:46:00 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1998-09-10 10:46:00 +0000 |
commit | 02e24c7ab0cc632fefb621ae3dbce2a2a05dbc3c (patch) | |
tree | de9738c2acffbfb708c950c2f7ba7a0d60650a14 /gcc/dwarfout.c | |
parent | 76f42086770774e0584495b4613cf360a0759c3f (diff) | |
download | gcc-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/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 450e063..660865b 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -1150,23 +1150,14 @@ static tree decl_ultimate_origin (decl) register tree decl; { - register tree immediate_origin = DECL_ABSTRACT_ORIGIN (decl); - - if (immediate_origin == NULL) - return NULL; - else - { - register tree ret_val; - register tree lookahead = immediate_origin; +#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 - do - { - ret_val = lookahead; - lookahead = DECL_ABSTRACT_ORIGIN (ret_val); - } - while (lookahead != NULL && lookahead != ret_val); - return ret_val; - } + return DECL_ABSTRACT_ORIGIN (decl); } /* Determine the "ultimate origin" of a block. The block may be an |