Commit 11daaf60 by Richard Henderson Committed by Hans-Peter Nilsson

genextract.c (VEC_safe_set_locstr): Take VEC by reference; update all callers.

	* genextract.c (VEC_safe_set_locstr): Take VEC by reference;
	update all callers.

From-SVN: r110171
parent 81162f97
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> 2006-01-23 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/25890 PR rtl-optimization/25890
......
...@@ -187,18 +187,18 @@ gen_insn (rtx insn, int insn_code_number) ...@@ -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 exist and be NULL, or not yet exist within the vector. In the latter
case the vector is enlarged as appropriate. */ case the vector is enlarged as appropriate. */
static void 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); gcc_assert (VEC_index (locstr, *vp, ix) == 0);
VEC_replace (locstr, v, ix, str); VEC_replace (locstr, *vp, ix, str);
} }
else else
{ {
while (ix > VEC_length (locstr, v)) while (ix > VEC_length (locstr, *vp))
VEC_safe_push (locstr,heap, v, 0); VEC_safe_push (locstr, heap, *vp, 0);
VEC_safe_push (locstr,heap, v, str); VEC_safe_push (locstr, heap, *vp, str);
} }
} }
...@@ -235,13 +235,13 @@ walk_rtx (rtx x, struct accum_extract *acc) ...@@ -235,13 +235,13 @@ walk_rtx (rtx x, struct accum_extract *acc)
case MATCH_OPERAND: case MATCH_OPERAND:
case MATCH_SCRATCH: 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)); VEC_char_to_string (acc->pathstr));
break; break;
case MATCH_OPERATOR: case MATCH_OPERATOR:
case MATCH_PARALLEL: 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)); VEC_char_to_string (acc->pathstr));
base = (code == MATCH_OPERATOR ? '0' : 'a'); base = (code == MATCH_OPERATOR ? '0' : 'a');
......
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