Commit 9bb80bb2 by Roger Sayle Committed by Roger Sayle

fold-const.c (constant_boolean_node): Handle boolean_type_node directly...


	* fold-const.c (constant_boolean_node): Handle boolean_type_node
	directly, return either boolean_true_node or boolean_false_node.

From-SVN: r83338
parent eb52a163
2004-06-17 Roger Sayle <roger@eyesopen.com>
* fold-const.c (constant_boolean_node): Handle boolean_type_node
directly, return either boolean_true_node or boolean_false_node.
2004-06-18 Kelley Cook <kcook@gcc.gnu.org>
* opts.sh: Delete. Break out generated code to next four files.
......
......@@ -4936,6 +4936,8 @@ constant_boolean_node (int value, tree type)
{
if (type == integer_type_node)
return value ? integer_one_node : integer_zero_node;
else if (type == boolean_type_node)
return value ? boolean_true_node : boolean_false_node;
else if (TREE_CODE (type) == BOOLEAN_TYPE)
return lang_hooks.truthvalue_conversion (value ? integer_one_node
: integer_zero_node);
......
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