ggc.h: Replace all 'static inline' with plain 'inline'.

* ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
	some formatting.

From-SVN: r249848
This commit is contained in:
Nathan Sidwell 2017-06-30 16:10:13 +00:00 committed by Nathan Sidwell
parent 39426ab74f
commit e886224be7
2 changed files with 23 additions and 20 deletions

View File

@ -1,3 +1,8 @@
2017-06-30 Nathan Sidwell <nathan@acm.org>
* ggc.h: Replace all 'static inline' with plain 'inline'. Fix
some formatting.
2017-06-30 Peter Bergner <bergner@vnet.ibm.com> 2017-06-30 Peter Bergner <bergner@vnet.ibm.com>
* tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing

View File

@ -127,9 +127,8 @@ extern void *ggc_internal_alloc (size_t, void (*)(void *), size_t,
size_t CXX_MEM_STAT_INFO) size_t CXX_MEM_STAT_INFO)
ATTRIBUTE_MALLOC; ATTRIBUTE_MALLOC;
static inline inline void *
void * ggc_internal_alloc (size_t s CXX_MEM_STAT_INFO)
ggc_internal_alloc (size_t s CXX_MEM_STAT_INFO)
{ {
return ggc_internal_alloc (s, NULL, 0, 1 PASS_MEM_STAT); return ggc_internal_alloc (s, NULL, 0, 1 PASS_MEM_STAT);
} }
@ -141,8 +140,7 @@ extern void *ggc_internal_cleared_alloc (size_t, void (*)(void *),
size_t, size_t size_t, size_t
CXX_MEM_STAT_INFO) ATTRIBUTE_MALLOC; CXX_MEM_STAT_INFO) ATTRIBUTE_MALLOC;
static inline inline void *
void *
ggc_internal_cleared_alloc (size_t s CXX_MEM_STAT_INFO) ggc_internal_cleared_alloc (size_t s CXX_MEM_STAT_INFO)
{ {
return ggc_internal_cleared_alloc (s, NULL, 0, 1 PASS_MEM_STAT); return ggc_internal_cleared_alloc (s, NULL, 0, 1 PASS_MEM_STAT);
@ -168,7 +166,7 @@ finalize (void *p)
} }
template<typename T> template<typename T>
static inline bool inline bool
need_finalization_p () need_finalization_p ()
{ {
#if GCC_VERSION >= 4003 #if GCC_VERSION >= 4003
@ -179,7 +177,7 @@ need_finalization_p ()
} }
template<typename T> template<typename T>
static inline T * inline T *
ggc_alloc (ALONE_CXX_MEM_STAT_INFO) ggc_alloc (ALONE_CXX_MEM_STAT_INFO)
{ {
if (need_finalization_p<T> ()) if (need_finalization_p<T> ())
@ -191,7 +189,7 @@ ggc_alloc (ALONE_CXX_MEM_STAT_INFO)
} }
template<typename T> template<typename T>
static inline T * inline T *
ggc_cleared_alloc (ALONE_CXX_MEM_STAT_INFO) ggc_cleared_alloc (ALONE_CXX_MEM_STAT_INFO)
{ {
if (need_finalization_p<T> ()) if (need_finalization_p<T> ())
@ -204,7 +202,7 @@ ggc_cleared_alloc (ALONE_CXX_MEM_STAT_INFO)
} }
template<typename T> template<typename T>
static inline T * inline T *
ggc_vec_alloc (size_t c CXX_MEM_STAT_INFO) ggc_vec_alloc (size_t c CXX_MEM_STAT_INFO)
{ {
if (need_finalization_p<T> ()) if (need_finalization_p<T> ())
@ -216,7 +214,7 @@ ggc_vec_alloc (size_t c CXX_MEM_STAT_INFO)
} }
template<typename T> template<typename T>
static inline T * inline T *
ggc_cleared_vec_alloc (size_t c CXX_MEM_STAT_INFO) ggc_cleared_vec_alloc (size_t c CXX_MEM_STAT_INFO)
{ {
if (need_finalization_p<T> ()) if (need_finalization_p<T> ())
@ -229,7 +227,7 @@ ggc_cleared_vec_alloc (size_t c CXX_MEM_STAT_INFO)
0, 0 PASS_MEM_STAT)); 0, 0 PASS_MEM_STAT));
} }
static inline void * inline void *
ggc_alloc_atomic (size_t s CXX_MEM_STAT_INFO) ggc_alloc_atomic (size_t s CXX_MEM_STAT_INFO)
{ {
return ggc_internal_alloc (s PASS_MEM_STAT); return ggc_internal_alloc (s PASS_MEM_STAT);
@ -274,52 +272,52 @@ extern void init_ggc_heuristics (void);
/* Memory statistics passing versions of some allocators. Too few of them to /* Memory statistics passing versions of some allocators. Too few of them to
make gengtype produce them, so just define the needed ones here. */ make gengtype produce them, so just define the needed ones here. */
static inline struct rtx_def * inline struct rtx_def *
ggc_alloc_rtx_def_stat (size_t s CXX_MEM_STAT_INFO) ggc_alloc_rtx_def_stat (size_t s CXX_MEM_STAT_INFO)
{ {
return (struct rtx_def *) ggc_internal_alloc (s PASS_MEM_STAT); return (struct rtx_def *) ggc_internal_alloc (s PASS_MEM_STAT);
} }
static inline union tree_node * inline union tree_node *
ggc_alloc_tree_node_stat (size_t s CXX_MEM_STAT_INFO) ggc_alloc_tree_node_stat (size_t s CXX_MEM_STAT_INFO)
{ {
return (union tree_node *) ggc_internal_alloc (s PASS_MEM_STAT); return (union tree_node *) ggc_internal_alloc (s PASS_MEM_STAT);
} }
static inline union tree_node * inline union tree_node *
ggc_alloc_cleared_tree_node_stat (size_t s CXX_MEM_STAT_INFO) ggc_alloc_cleared_tree_node_stat (size_t s CXX_MEM_STAT_INFO)
{ {
return (union tree_node *) ggc_internal_cleared_alloc (s PASS_MEM_STAT); return (union tree_node *) ggc_internal_cleared_alloc (s PASS_MEM_STAT);
} }
static inline gimple * inline gimple *
ggc_alloc_cleared_gimple_statement_stat (size_t s CXX_MEM_STAT_INFO) ggc_alloc_cleared_gimple_statement_stat (size_t s CXX_MEM_STAT_INFO)
{ {
return (gimple *) ggc_internal_cleared_alloc (s PASS_MEM_STAT); return (gimple *) ggc_internal_cleared_alloc (s PASS_MEM_STAT);
} }
static inline void inline void
gt_ggc_mx (const char *s) gt_ggc_mx (const char *s)
{ {
ggc_test_and_set_mark (const_cast<char *> (s)); ggc_test_and_set_mark (const_cast<char *> (s));
} }
static inline void inline void
gt_pch_nx (const char *) gt_pch_nx (const char *)
{ {
} }
static inline void inline void
gt_ggc_mx (int) gt_ggc_mx (int)
{ {
} }
static inline void inline void
gt_pch_nx (int) gt_pch_nx (int)
{ {
} }
static inline void inline void
gt_pch_nx (unsigned int) gt_pch_nx (unsigned int)
{ {
} }