From: Richard Guenther Date: Tue, 9 Oct 2012 13:34:54 +0000 (+0000) Subject: tree-streamer.c (streamer_tree_cache_get): Move ... X-Git-Tag: misc/gccgo-go1_1_2~306 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58191b2eb730e384f32a15f07c59508366d55076;p=thirdparty%2Fgcc.git tree-streamer.c (streamer_tree_cache_get): Move ... 2012-10-09 Richard Guenther * tree-streamer.c (streamer_tree_cache_get): Move ... * tree-streamer.h (streamer_tree_cache_get): ... here as inline. From-SVN: r192252 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67e4a64fec6b..c32e666f5c66 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-10-09 Richard Guenther + + * tree-streamer.c (streamer_tree_cache_get): Move ... + * tree-streamer.h (streamer_tree_cache_get): ... here as inline. + 2012-10-09 Jan Hubicka * loop-unroll.c (unroll_loop_constant_iterations): Add diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c index f7c15178e67c..1f4fe96fa032 100644 --- a/gcc/tree-streamer.c +++ b/gcc/tree-streamer.c @@ -232,20 +232,6 @@ streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t, } -/* Return the tree node at slot IX in CACHE. */ - -tree -streamer_tree_cache_get (struct streamer_tree_cache_d *cache, unsigned ix) -{ - gcc_assert (cache); - - /* Make sure we're not requesting something we don't have. */ - gcc_assert (ix < VEC_length (tree, cache->nodes)); - - return VEC_index (tree, cache->nodes, ix); -} - - /* Record NODE in CACHE. */ static void diff --git a/gcc/tree-streamer.h b/gcc/tree-streamer.h index 06313303f0b6..be0b1a3f95df 100644 --- a/gcc/tree-streamer.h +++ b/gcc/tree-streamer.h @@ -93,8 +93,16 @@ bool streamer_tree_cache_insert_at (struct streamer_tree_cache_d *, tree, void streamer_tree_cache_append (struct streamer_tree_cache_d *, tree); bool streamer_tree_cache_lookup (struct streamer_tree_cache_d *, tree, unsigned *); -tree streamer_tree_cache_get (struct streamer_tree_cache_d *, unsigned); struct streamer_tree_cache_d *streamer_tree_cache_create (void); void streamer_tree_cache_delete (struct streamer_tree_cache_d *); +/* Return the tree node at slot IX in CACHE. */ + +static inline tree +streamer_tree_cache_get (struct streamer_tree_cache_d *cache, unsigned ix) +{ + return VEC_index (tree, cache->nodes, ix); +} + + #endif /* GCC_TREE_STREAMER_H */