Message ID | 1444004727-3423-3-git-send-email-tbsaunde+gcc@tbsaunde.org |
---|---|
State | New |
Headers | show |
On Mon, Oct 5, 2015 at 2:25 AM, <tbsaunde+gcc@tbsaunde.org> wrote: > From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> > > gcc/ChangeLog: > > 2015-10-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> > > * gimple.h (gimple_location_ptr): Remove. > * tree-vrp.c (check_all_array_refs): Adjust. Ok. Thanks, RIchard. > --- > gcc/gimple.h | 9 --------- > gcc/tree-vrp.c | 5 +++-- > 2 files changed, 3 insertions(+), 11 deletions(-) > > diff --git a/gcc/gimple.h b/gcc/gimple.h > index 30b1041..cfd8d2c 100644 > --- a/gcc/gimple.h > +++ b/gcc/gimple.h > @@ -1734,15 +1734,6 @@ gimple_location_safe (const gimple *g) > return g ? gimple_location (g) : UNKNOWN_LOCATION; > } > > -/* Return pointer to location information for statement G. */ > - > -static inline const location_t * > -gimple_location_ptr (const gimple *g) > -{ > - return &g->location; > -} > - > - > /* Set location information for statement G. */ > > static inline void > diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c > index 3bc3b03..ef5ef10 100644 > --- a/gcc/tree-vrp.c > +++ b/gcc/tree-vrp.c > @@ -6717,8 +6717,9 @@ check_all_array_refs (void) > continue; > > memset (&wi, 0, sizeof (wi)); > - wi.info = CONST_CAST (void *, (const void *) > - gimple_location_ptr (stmt)); > + > + location_t loc = gimple_location (stmt); > + wi.info = &loc; > > walk_gimple_op (gsi_stmt (si), > check_array_bounds, > -- > 2.4.0 >
diff --git a/gcc/gimple.h b/gcc/gimple.h index 30b1041..cfd8d2c 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1734,15 +1734,6 @@ gimple_location_safe (const gimple *g) return g ? gimple_location (g) : UNKNOWN_LOCATION; } -/* Return pointer to location information for statement G. */ - -static inline const location_t * -gimple_location_ptr (const gimple *g) -{ - return &g->location; -} - - /* Set location information for statement G. */ static inline void diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 3bc3b03..ef5ef10 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6717,8 +6717,9 @@ check_all_array_refs (void) continue; memset (&wi, 0, sizeof (wi)); - wi.info = CONST_CAST (void *, (const void *) - gimple_location_ptr (stmt)); + + location_t loc = gimple_location (stmt); + wi.info = &loc; walk_gimple_op (gsi_stmt (si), check_array_bounds,
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> gcc/ChangeLog: 2015-10-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * gimple.h (gimple_location_ptr): Remove. * tree-vrp.c (check_all_array_refs): Adjust. --- gcc/gimple.h | 9 --------- gcc/tree-vrp.c | 5 +++-- 2 files changed, 3 insertions(+), 11 deletions(-)