diff options
author | Martin Liska <mliska@suse.cz> | 2021-05-24 11:18:21 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-05-31 11:25:37 +0200 |
commit | 21d7bba242f1a7349adc6a57aa4c874f7bb159f8 (patch) | |
tree | f044c9d3fc396d158dc9e1cc2d5f7cb497d20cfb /gcc/tree.h | |
parent | ef8176e0fac935c095cc39f4ecdfd43cdb8cb3f3 (diff) | |
download | gcc-21d7bba242f1a7349adc6a57aa4c874f7bb159f8.zip gcc-21d7bba242f1a7349adc6a57aa4c874f7bb159f8.tar.gz gcc-21d7bba242f1a7349adc6a57aa4c874f7bb159f8.tar.bz2 |
LTO: stream properly FUNCTION_DECL_DECL_TYPE.
gcc/lto/ChangeLog:
* lto-common.c (compare_tree_sccs_1): Compare
FUNCTION_DECL_DECL_TYPE.
gcc/ChangeLog:
* tree-streamer-in.c (unpack_ts_function_decl_value_fields):
Unpack FUNCTION_DECL_DECL_TYPE.
* tree-streamer-out.c (pack_ts_function_decl_value_fields):
Stream FUNCTION_DECL_DECL_TYPE instead of
DECL_IS_OPERATOR_NEW_P.
* tree.h (set_function_decl_type): Use FUNCTION_DECL_DECL_TYPE
macro.
(DECL_IS_OPERATOR_NEW_P): Likewise.
(DECL_IS_OPERATOR_DELETE_P): Likewise.
(DECL_LAMBDA_FUNCTION_P): Likewise.
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3111,7 +3111,7 @@ set_function_decl_type (tree decl, function_decl_type t, bool set) { gcc_assert (FUNCTION_DECL_DECL_TYPE (decl) == NONE || FUNCTION_DECL_DECL_TYPE (decl) == t); - decl->function_decl.decl_type = t; + FUNCTION_DECL_DECL_TYPE (decl) = t; } else if (FUNCTION_DECL_DECL_TYPE (decl) == t) FUNCTION_DECL_DECL_TYPE (decl) = NONE; @@ -3126,7 +3126,7 @@ set_function_decl_type (tree decl, function_decl_type t, bool set) C++ operator new, meaning that it returns a pointer for which we should not use type based aliasing. */ #define DECL_IS_OPERATOR_NEW_P(NODE) \ - (FUNCTION_DECL_CHECK (NODE)->function_decl.decl_type == OPERATOR_NEW) + (FUNCTION_DECL_DECL_TYPE (FUNCTION_DECL_CHECK (NODE)) == OPERATOR_NEW) #define DECL_IS_REPLACEABLE_OPERATOR_NEW_P(NODE) \ (DECL_IS_OPERATOR_NEW_P (NODE) && DECL_IS_REPLACEABLE_OPERATOR (NODE)) @@ -3137,7 +3137,7 @@ set_function_decl_type (tree decl, function_decl_type t, bool set) /* Nonzero in a FUNCTION_DECL means this function should be treated as C++ operator delete. */ #define DECL_IS_OPERATOR_DELETE_P(NODE) \ - (FUNCTION_DECL_CHECK (NODE)->function_decl.decl_type == OPERATOR_DELETE) + (FUNCTION_DECL_DECL_TYPE (FUNCTION_DECL_CHECK (NODE)) == OPERATOR_DELETE) #define DECL_SET_IS_OPERATOR_DELETE(NODE, VAL) \ set_function_decl_type (FUNCTION_DECL_CHECK (NODE), OPERATOR_DELETE, VAL) @@ -3288,7 +3288,7 @@ extern vec<tree, va_gc> **decl_debug_args_insert (tree); /* In FUNCTION_DECL, this is set if this function is a lambda function. */ #define DECL_LAMBDA_FUNCTION_P(NODE) \ - (FUNCTION_DECL_CHECK (NODE)->function_decl.decl_type == LAMBDA_FUNCTION) + (FUNCTION_DECL_DECL_TYPE (FUNCTION_DECL_CHECK (NODE)) == LAMBDA_FUNCTION) #define DECL_SET_LAMBDA_FUNCTION(NODE, VAL) \ set_function_decl_type (FUNCTION_DECL_CHECK (NODE), LAMBDA_FUNCTION, VAL) |