aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2011-04-08 17:05:23 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2011-04-08 17:05:23 +0000
commitdcf0c47e8ddf338b9d3f02f9bee3265c1b4138d1 (patch)
treee61a834b9d87f991a0510f3ef3272372cd473ce0 /gcc/lto
parent44f370bf4c8ad5c0f780f28c88b7df396d9dd140 (diff)
downloadgcc-dcf0c47e8ddf338b9d3f02f9bee3265c1b4138d1.zip
gcc-dcf0c47e8ddf338b9d3f02f9bee3265c1b4138d1.tar.gz
gcc-dcf0c47e8ddf338b9d3f02f9bee3265c1b4138d1.tar.bz2
utils.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES
gcc/ada/ * gcc-interface/utils.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES (handle_type_generic_attribute): Likewise. gcc/c-family/ * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES. (handle_type_generic_attribute): Likewise. gcc/lto/ * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES. (handle_type_generic_attribute): Likewise. From-SVN: r172200
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-lang.c16
2 files changed, 7 insertions, 14 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 00f695f..56bf3f5b 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
+
+ * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
+ (handle_type_generic_attribute): Likewise.
+
2011-04-03 Michael Matz <matz@suse.de>
* lto.c (lto_materialize_function): Don't read and then discard
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 535fc58..c65d916 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -373,13 +373,7 @@ handle_sentinel_attribute (tree *node, tree ARG_UNUSED (name), tree args,
int ARG_UNUSED (flags),
bool * ARG_UNUSED (no_add_attrs))
{
- tree params = TYPE_ARG_TYPES (*node);
- gcc_assert (params);
-
- while (TREE_CHAIN (params))
- params = TREE_CHAIN (params);
-
- gcc_assert (!VOID_TYPE_P (TREE_VALUE (params)));
+ gcc_assert (stdarg_p (*node));
if (args)
{
@@ -399,17 +393,11 @@ handle_type_generic_attribute (tree *node, tree ARG_UNUSED (name),
tree ARG_UNUSED (args), int ARG_UNUSED (flags),
bool * ARG_UNUSED (no_add_attrs))
{
- tree params;
-
/* Ensure we have a function type. */
gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE);
- params = TYPE_ARG_TYPES (*node);
- while (params && ! VOID_TYPE_P (TREE_VALUE (params)))
- params = TREE_CHAIN (params);
-
/* Ensure we have a variadic function. */
- gcc_assert (!params);
+ gcc_assert (!prototype_p (*node) || stdarg_p (*node));
return NULL_TREE;
}