Commit b9a26d09 by Neil Booth Committed by Neil Booth

integrate.c (function_attribute_inlinable_p): Simplify.

	* integrate.c (function_attribute_inlinable_p): Simplify.
	Check the table pointer is not NULL.

From-SVN: r52763
parent bf882c20
2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
* integrate.c (function_attribute_inlinable_p): Simplify.
Check the table pointer is not NULL.
2002-04-25 Steven Bosscher <S.Bosscher@student.tudelft.nl> 2002-04-25 Steven Bosscher <S.Bosscher@student.tudelft.nl>
* doc/c-tree.texi: Fix typo in introduction. * doc/c-tree.texi: Fix typo in introduction.
......
...@@ -132,7 +132,8 @@ bool ...@@ -132,7 +132,8 @@ bool
function_attribute_inlinable_p (fndecl) function_attribute_inlinable_p (fndecl)
tree fndecl; tree fndecl;
{ {
bool has_machine_attr = false; if (targetm.attribute_table)
{
tree a; tree a;
for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a)) for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a))
...@@ -141,20 +142,11 @@ function_attribute_inlinable_p (fndecl) ...@@ -141,20 +142,11 @@ function_attribute_inlinable_p (fndecl)
int i; int i;
for (i = 0; targetm.attribute_table[i].name != NULL; i++) for (i = 0; targetm.attribute_table[i].name != NULL; i++)
{
if (is_attribute_p (targetm.attribute_table[i].name, name)) if (is_attribute_p (targetm.attribute_table[i].name, name))
{ return (*targetm.function_attribute_inlinable_p) (fndecl);
has_machine_attr = true;
break;
}
} }
if (has_machine_attr)
break;
} }
if (has_machine_attr)
return (*targetm.function_attribute_inlinable_p) (fndecl);
else
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment