]> gcc.gnu.org Git - gcc.git/commitdiff
Use const for some function arguments.
authorMartin Liska <mliska@suse.cz>
Tue, 4 Feb 2020 13:55:14 +0000 (14:55 +0100)
committerMartin Liska <mliska@suse.cz>
Tue, 5 May 2020 13:54:57 +0000 (15:54 +0200)
gcc/ChangeLog:

2020-02-04  Martin Liska  <mliska@suse.cz>

PR c/92472
* alloc-pool.h: Use const for some arguments.
* bitmap.h: Likewise.
* mem-stats.h: Likewise.
* sese.h (get_entry_bb): Likewise.
(get_exit_bb): Likewise.

gcc/alloc-pool.h
gcc/bitmap.h
gcc/mem-stats.h
gcc/sese.h

index 1686a8b5f91a85c4400784d683e3d6f363f74f69..fd7194bfea423a2d959aa0d2d1209678252af2a8 100644 (file)
@@ -60,7 +60,7 @@ public:
 
   /* Dump usage coupled to LOC location, where TOTAL is sum of all rows.  */
   inline void
-  dump (mem_location *loc, mem_usage &total) const
+  dump (mem_location *loc, const mem_usage &total) const
   {
     char *location_string = loc->to_string ();
 
index d52fd5bb905ea9ae3a7df7488e85b385518f3bf9..b481f4b260672cf589ec8b8bc626216e59d4f3cf 100644 (file)
@@ -237,7 +237,7 @@ public:
 
   /* Dump usage coupled to LOC location, where TOTAL is sum of all rows.  */
   inline void
-  dump (mem_location *loc, mem_usage &total) const
+  dump (mem_location *loc, const mem_usage &total) const
   {
     char *location_string = loc->to_string ();
 
index 21d038bb3707228cab6c25a9c7e4a9e5b01137b0..4a3177dd4fc215475538b3d665bedd7d0f253687 100644 (file)
@@ -70,7 +70,7 @@ public:
 
   /* Return true if the memory location is equal to OTHER.  */
   int
-  equal (mem_location &other)
+  equal (const mem_location &other)
   {
     return m_filename == other.m_filename && m_function == other.m_function
       && m_line == other.m_line;
@@ -203,7 +203,7 @@ public:
 
   /* Dump usage coupled to LOC location, where TOTAL is sum of all rows.  */
   inline void
-  dump (mem_location *loc, mem_usage &total) const
+  dump (mem_location *loc, const mem_usage &total) const
   {
     char *location_string = loc->to_string ();
 
index 8afea28b07ea36423315815726d1346f507752ee..74d3fe3cd8a01e0b71fc7a017f607fb6f72578c3 100644 (file)
@@ -45,7 +45,7 @@ void dump_sese (const sese_l &);
 /* Get the entry of an sese S.  */
 
 static inline basic_block
-get_entry_bb (sese_l &s)
+get_entry_bb (const sese_l &s)
 {
   return s.entry->dest;
 }
@@ -53,7 +53,7 @@ get_entry_bb (sese_l &s)
 /* Get the exit of an sese S.  */
 
 static inline basic_block
-get_exit_bb (sese_l &s)
+get_exit_bb (const sese_l &s)
 {
   return s.exit->src;
 }
This page took 0.070336 seconds and 5 git commands to generate.