#include "cgraph.h"
#include "tree-iterator.h"
#include "hash-table.h"
+#include "wide-int.h"
#include "langhooks-def.h"
/* Different initialization, code gen and meta data generation for each
runtime. */
which specifies the index of the format string
argument. Add 2. */
number = TREE_VALUE (second_argument);
- if (number
- && TREE_CODE (number) == INTEGER_CST
- && TREE_INT_CST_HIGH (number) == 0)
- {
- TREE_VALUE (second_argument)
- = build_int_cst (integer_type_node,
- TREE_INT_CST_LOW (number) + 2);
- }
+ if (number && TREE_CODE (number) == INTEGER_CST)
+ TREE_VALUE (second_argument)
+ = wide_int_to_tree (TREE_TYPE (number),
+ wi::add (number, 2));
/* This is the third argument, the "first-to-check",
which specifies the index of the first argument to
in which case we don't need to add 2. Add 2 if not
0. */
number = TREE_VALUE (third_argument);
- if (number
- && TREE_CODE (number) == INTEGER_CST
- && TREE_INT_CST_HIGH (number) == 0
- && TREE_INT_CST_LOW (number) != 0)
- {
- TREE_VALUE (third_argument)
- = build_int_cst (integer_type_node,
- TREE_INT_CST_LOW (number) + 2);
- }
+ if (number && TREE_CODE (number) == INTEGER_CST)
+ TREE_VALUE (third_argument)
+ = wide_int_to_tree (TREE_TYPE (number),
+ wi::add (number, 2));
}
filtered_attributes = chainon (filtered_attributes,
new_attribute);
{
/* Get the value of the argument and add 2. */
tree number = TREE_VALUE (argument);
- if (number
- && TREE_CODE (number) == INTEGER_CST
- && TREE_INT_CST_HIGH (number) == 0
- && TREE_INT_CST_LOW (number) != 0)
- {
- TREE_VALUE (argument)
- = build_int_cst (integer_type_node,
- TREE_INT_CST_LOW (number) + 2);
- }
+ if (number && TREE_CODE (number) == INTEGER_CST
+ && !wi::eq_p (number, 0))
+ TREE_VALUE (argument)
+ = wide_int_to_tree (TREE_TYPE (number),
+ wi::add (number, 2));
argument = TREE_CHAIN (argument);
}