aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto-lang.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2011-11-22 18:37:16 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2011-11-22 18:37:16 +0000
commit57ac2606c472c30be27975f137f36b81d0824af8 (patch)
treed9c627efeb62217e0942238cce58b0177ffc0e93 /gcc/lto/lto-lang.c
parent73cd7644a7873b52c4a5fd81e20ec05fbfee8274 (diff)
downloadgcc-57ac2606c472c30be27975f137f36b81d0824af8.zip
gcc-57ac2606c472c30be27975f137f36b81d0824af8.tar.gz
gcc-57ac2606c472c30be27975f137f36b81d0824af8.tar.bz2
opts.c (finish_options): Do not fail for -fgnu-tm.
* opts.c (finish_options): Do not fail for -fgnu-tm. * gimple-streamer-out.c (output_gimple_stmt): Handle GIMPLE_TRANSACTION. * gimple-streamer-in.c (input_gimple_stmt): Same. * lto-cgraph.c (input_overwrite_node): Read tm_clone bit. (lto_output_node): Write tm_clone bit. lto/ * lto-lang.c (lto_attribute_table): Handle transaction_pure. (handle_transaction_pure_attribute): New. From-SVN: r181629
Diffstat (limited to 'gcc/lto/lto-lang.c')
-rw-r--r--gcc/lto/lto-lang.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index c702b9a..2536f26 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -46,6 +46,7 @@ static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *);
static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *);
static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *);
static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *);
+static tree handle_transaction_pure_attribute (tree *, tree, tree, int, bool *);
static tree handle_format_attribute (tree *, tree, tree, int, bool *);
static tree handle_format_arg_attribute (tree *, tree, tree, int, bool *);
@@ -75,6 +76,8 @@ const struct attribute_spec lto_attribute_table[] =
handle_sentinel_attribute, false },
{ "type generic", 0, 0, false, true, true,
handle_type_generic_attribute, false },
+ { "transaction_pure", 0, 0, false, true, true,
+ handle_transaction_pure_attribute, false },
{ NULL, 0, 0, false, false, false, NULL, false }
};
@@ -402,6 +405,20 @@ handle_type_generic_attribute (tree *node, tree ARG_UNUSED (name),
return NULL_TREE;
}
+/* Handle a "transaction_pure" attribute. */
+
+static tree
+handle_transaction_pure_attribute (tree *node, tree ARG_UNUSED (name),
+ tree ARG_UNUSED (args),
+ int ARG_UNUSED (flags),
+ bool * ARG_UNUSED (no_add_attrs))
+{
+ /* Ensure we have a function type. */
+ gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE);
+
+ return NULL_TREE;
+}
+
/* Handle a "format" attribute; arguments as in
struct attribute_spec.handler. */