aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
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/tree.h
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/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 08bda488..aee712f 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1101,6 +1101,11 @@ struct tree_type
definition. */
#define DECL_ABSTRACT_ORIGIN(NODE) (DECL_CHECK (NODE)->decl.abstract_origin)
+/* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract
+ origin. This is useful when setting the DECL_ABSTRACT_ORIGIN. */
+#define DECL_ORIGIN(NODE) \
+ (DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : NODE)
+
/* Nonzero for any sort of ..._DECL node means this decl node represents
an inline instance of some original (abstract) decl from an inline function;
suppress any warnings about shadowing some other variable. */