summaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-25 18:55:48 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-25 18:55:48 +0000
commitdc600c9e677e39d5cf78bfdf4678bb74d0e5cc25 (patch)
tree146fb93e9c2389f218e815629c9edeb0749bec52 /gcc/integrate.c
parente94bc562a8131493854e84d95d8142191e5f0280 (diff)
downloadgcc-dc600c9e677e39d5cf78bfdf4678bb74d0e5cc25.tar.gz
* integrate.c (function_attribute_inlinable_p): Simplify.
Check the table pointer is not NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52763 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index db540c9b596..66be25bd683 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -132,30 +132,22 @@ bool
function_attribute_inlinable_p (fndecl)
tree fndecl;
{
- bool has_machine_attr = false;
- tree a;
-
- for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a))
+ if (targetm.attribute_table)
{
- tree name = TREE_PURPOSE (a);
- int i;
+ tree a;
- for (i = 0; targetm.attribute_table[i].name != NULL; i++)
+ for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a))
{
- if (is_attribute_p (targetm.attribute_table[i].name, name))
- {
- has_machine_attr = true;
- break;
- }
+ tree name = TREE_PURPOSE (a);
+ int i;
+
+ for (i = 0; targetm.attribute_table[i].name != NULL; i++)
+ if (is_attribute_p (targetm.attribute_table[i].name, name))
+ return (*targetm.function_attribute_inlinable_p) (fndecl);
}
- if (has_machine_attr)
- break;
}
- if (has_machine_attr)
- return (*targetm.function_attribute_inlinable_p) (fndecl);
- else
- return true;
+ return true;
}
/* Zero if the current function (whose FUNCTION_DECL is FNDECL)