diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2015-06-17 17:55:26 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2015-06-17 17:55:26 +0000 |
commit | f6e3667f976a0592eb156d948a9dfe240250778d (patch) | |
tree | 47ffd968873b970774f3d2d5fcd11f73725f8a54 /gcc/tree.c | |
parent | 21bdef94b1e8c178e932cb5b560726c2c8c00323 (diff) | |
download | gcc-f6e3667f976a0592eb156d948a9dfe240250778d.tar.gz |
tree-core.h (tree_target_option): Make opts field a pointer to a cl_target_option instead of an instance of the...
2017-06-17 Andrew MacLeod <amacleod@redhat.com>
* tree-core.h (tree_target_option): Make opts field a pointer to a
cl_target_option instead of an instance of the struct.
* tree.h (TREE_TARGET_OPTION): Return the pointer, not an address of
the structure.
* tree.c (make_node_stat ): Allocate a cl_target_option struct for
TARGET_OPTION_NODE.
(copy_node_stat): Allocate and copy struct cl_target_option.
From-SVN: r224567
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 419e2767d9b..f6ab441ae03 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1094,6 +1094,13 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) } break; + case tcc_exceptional: + if (code == TARGET_OPTION_NODE) + { + TREE_TARGET_OPTION(t) = ggc_cleared_alloc<struct cl_target_option> (); + } + break; + default: /* Other classes need no special treatment. */ break; @@ -1175,6 +1182,12 @@ copy_node_stat (tree node MEM_STAT_DECL) TYPE_CACHED_VALUES (t) = NULL_TREE; } } + else if (code == TARGET_OPTION_NODE) + { + TREE_TARGET_OPTION (t) = ggc_alloc<struct cl_target_option>(); + memcpy (TREE_TARGET_OPTION (t), TREE_TARGET_OPTION (node), + sizeof (struct cl_target_option)); + } return t; } |