aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-06-03 16:49:13 +0200
committerMartin Liska <marxin@gcc.gnu.org>2015-06-03 14:49:13 +0000
commit80a4fe78bf071c07a71f640bd861193b85c27138 (patch)
tree6099942cfb1d37ffb58443756cd0f685b1cfd9f8 /gcc/vec.c
parent368054069fadd814a2d36d1614a393982019ed9b (diff)
downloadgcc-80a4fe78bf071c07a71f640bd861193b85c27138.zip
gcc-80a4fe78bf071c07a71f640bd861193b85c27138.tar.gz
gcc-80a4fe78bf071c07a71f640bd861193b85c27138.tar.bz2
Fix GNU coding style in memory statistics.
* alloc-pool.h (struct pool_usage): Correct GNU coding style. * bitmap.h (struct bitmap_usage): Likewise. * ggc-common.c (struct ggc_usage): Likewise. * mem-stats.h (struct mem_location): Likewise. (struct mem_usage): Likewise. * vec.c (struct vec_usage): Likewise. From-SVN: r224082
Diffstat (limited to 'gcc/vec.c')
-rw-r--r--gcc/vec.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/vec.c b/gcc/vec.c
index d4a7a02..f1a4d65 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -60,7 +60,8 @@ struct vec_usage: public mem_usage
m_items (items), m_items_peak (items_peak) {}
/* Comparison operator. */
- inline bool operator< (const vec_usage &second) const
+ inline bool
+ operator< (const vec_usage &second) const
{
return (m_allocated == second.m_allocated ?
(m_peak == second.m_peak ? m_times < second.m_times
@@ -68,7 +69,8 @@ struct vec_usage: public mem_usage
}
/* Sum the usage with SECOND usage. */
- vec_usage operator+ (const vec_usage &second)
+ vec_usage
+ operator+ (const vec_usage &second)
{
return vec_usage (m_allocated + second.m_allocated,
m_times + second.m_times,
@@ -78,7 +80,8 @@ struct vec_usage: public mem_usage
}
/* Dump usage coupled to LOC location, where TOTAL is sum of all rows. */
- inline void dump (mem_location *loc, mem_usage &total) const
+ inline void
+ dump (mem_location *loc, mem_usage &total) const
{
char s[4096];
sprintf (s, "%s:%i (%s)", loc->get_trimmed_filename (),
@@ -93,7 +96,8 @@ struct vec_usage: public mem_usage
}
/* Dump footer. */
- inline void dump_footer ()
+ inline void
+ dump_footer ()
{
print_dash_line ();
fprintf (stderr, "%s%55li%25li%17li\n", "Total", (long)m_allocated,
@@ -102,7 +106,8 @@ struct vec_usage: public mem_usage
}
/* Dump header with NAME. */
- static inline void dump_header (const char *name)
+ static inline void
+ dump_header (const char *name)
{
fprintf (stderr, "%-48s %11s%15s%10s%17s%11s\n", name, "Leak", "Peak",
"Times", "Leak items", "Peak items");
@@ -110,7 +115,8 @@ struct vec_usage: public mem_usage
}
/* Compare wrapper used by qsort method. */
- static int compare (const void *first, const void *second)
+ static int
+ compare (const void *first, const void *second)
{
typedef std::pair<mem_location *, vec_usage *> mem_pair_t;