diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-10 10:46:00 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-10 10:46:00 +0000 |
commit | c0671ae811e6e08fc110c779ecc0d03fa9ff1c69 (patch) | |
tree | de9738c2acffbfb708c950c2f7ba7a0d60650a14 /gcc/dwarfout.c | |
parent | f2a133b9e259fc27520fbf3e6d7ef498d7be099f (diff) | |
download | gcc-c0671ae811e6e08fc110c779ecc0d03fa9ff1c69.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22380 138bc75d-0d04-0410-961f-82ee72b054a4
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 450e063c120..660865b11d6 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 |