aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2006-01-24 15:17:22 +0000
committerHans-Peter Nilsson <hp@axis.com>2006-01-24 15:17:22 +0000
commita61b467676c8674ddaeb4c1ed614c02da26e34f5 (patch)
tree210eafbf92830401b1c33956085c896dbbc91330 /gcc
parent9ed2e4d05f4c87463c2b67831482abf1f496d266 (diff)
* genextract.c (VEC_safe_set_locstr): Take VEC by reference;
update all callers. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@110171 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/genextract.c18
2 files changed, 14 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d5046c4c801..4d284e25ad3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-24 Richard Henderson <rth@redhat.com>
+
+ * genextract.c (VEC_safe_set_locstr): Take VEC by reference;
+ update all callers.
+
2006-01-23 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/25890
diff --git a/gcc/genextract.c b/gcc/genextract.c
index 319a0b0bfa9..4ef4d982ca6 100644
--- a/gcc/genextract.c
+++ b/gcc/genextract.c
@@ -187,18 +187,18 @@ gen_insn (rtx insn, int insn_code_number)
exist and be NULL, or not yet exist within the vector. In the latter
case the vector is enlarged as appropriate. */
static void
-VEC_safe_set_locstr (VEC(locstr,heap) *v, unsigned int ix, char *str)
+VEC_safe_set_locstr (VEC(locstr,heap) **vp, unsigned int ix, char *str)
{
- if (ix < VEC_length (locstr, v))
+ if (ix < VEC_length (locstr, *vp))
{
- gcc_assert (VEC_index (locstr, v, ix) == 0);
- VEC_replace (locstr, v, ix, str);
+ gcc_assert (VEC_index (locstr, *vp, ix) == 0);
+ VEC_replace (locstr, *vp, ix, str);
}
else
{
- while (ix > VEC_length (locstr, v))
- VEC_safe_push (locstr,heap, v, 0);
- VEC_safe_push (locstr,heap, v, str);
+ while (ix > VEC_length (locstr, *vp))
+ VEC_safe_push (locstr, heap, *vp, 0);
+ VEC_safe_push (locstr, heap, *vp, str);
}
}
@@ -235,13 +235,13 @@ walk_rtx (rtx x, struct accum_extract *acc)
case MATCH_OPERAND:
case MATCH_SCRATCH:
- VEC_safe_set_locstr (acc->oplocs, XINT (x, 0),
+ VEC_safe_set_locstr (&acc->oplocs, XINT (x, 0),
VEC_char_to_string (acc->pathstr));
break;
case MATCH_OPERATOR:
case MATCH_PARALLEL:
- VEC_safe_set_locstr (acc->oplocs, XINT (x, 0),
+ VEC_safe_set_locstr (&acc->oplocs, XINT (x, 0),
VEC_char_to_string (acc->pathstr));
base = (code == MATCH_OPERATOR ? '0' : 'a');