+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.
+
2015-06-17 Andrew MacLeod <amacleod@redhat.com>
* tree.h (merge_dllimport_decl_attributes, handle_dll_attribute):
struct target_globals *globals;
/* The optimization options used by the user. */
- struct cl_target_option opts;
+ struct cl_target_option *opts;
};
/* Define the overall contents of a tree node.
}
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;
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;
}
extern tree build_optimization_node (struct gcc_options *opts);
#define TREE_TARGET_OPTION(NODE) \
- (&TARGET_OPTION_NODE_CHECK (NODE)->target_option.opts)
+ (TARGET_OPTION_NODE_CHECK (NODE)->target_option.opts)
#define TREE_TARGET_GLOBALS(NODE) \
(TARGET_OPTION_NODE_CHECK (NODE)->target_option.globals)