dumpfile.c/h: add "const" to dump location ctors
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 2 Aug 2018 08:33:47 +0000 (08:33 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 2 Aug 2018 08:33:47 +0000 (08:33 +0000)
gcc/ChangeLog:
* dumpfile.c (dump_user_location_t::dump_user_location_t): Add
"const" to the "gimple *" and "rtx_insn *" parameters.
* dumpfile.h (dump_user_location_t::dump_user_location_t):
Likewise.
(dump_location_t::dump_location_t): Likewise.

From-SVN: r263244

gcc/ChangeLog
gcc/dumpfile.c
gcc/dumpfile.h

index 9b767bac0fe2af723e738b712849490d04df93b1..367a529d4b66dbcd3e5103daecfd7b7242cdab08 100644 (file)
@@ -1,3 +1,11 @@
+2018-08-02  David Malcolm  <dmalcolm@redhat.com>
+
+       * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
+       "const" to the "gimple *" and "rtx_insn *" parameters.
+       * dumpfile.h (dump_user_location_t::dump_user_location_t):
+       Likewise.
+       (dump_location_t::dump_location_t): Likewise.
+
 2018-08-01  Martin Sebor  <msebor@redhat.com>
 
        PR tree-optimization/86650
index 10e9cabc6fa5793c91cce68735f7988149bbb74f..76a2ee8edc447af4ddafc14052d0ac629a9563a9 100644 (file)
@@ -397,7 +397,7 @@ dump_open_alternate_stream (struct dump_file_info *dfi)
 /* Construct a dump_user_location_t from STMT (using its location and
    hotness).  */
 
-dump_user_location_t::dump_user_location_t (gimple *stmt)
+dump_user_location_t::dump_user_location_t (const gimple *stmt)
 : m_count (), m_loc (UNKNOWN_LOCATION)
 {
   if (stmt)
@@ -411,7 +411,7 @@ dump_user_location_t::dump_user_location_t (gimple *stmt)
 /* Construct a dump_user_location_t from an RTL instruction (using its
    location and hotness).  */
 
-dump_user_location_t::dump_user_location_t (rtx_insn *insn)
+dump_user_location_t::dump_user_location_t (const rtx_insn *insn)
 : m_count (), m_loc (UNKNOWN_LOCATION)
 {
   if (insn)
index 2b174e5ea0f19370ff2bae3c5e190f3b5e6e5cb7..8de001d95e44f5ee586da7ee2345390059d1fed7 100644 (file)
@@ -285,10 +285,10 @@ class dump_user_location_t
   dump_user_location_t () : m_count (), m_loc (UNKNOWN_LOCATION) {}
 
   /* Construct from a gimple statement (using its location and hotness).  */
-  dump_user_location_t (gimple *stmt);
+  dump_user_location_t (const gimple *stmt);
 
   /* Construct from an RTL instruction (using its location and hotness).  */
-  dump_user_location_t (rtx_insn *insn);
+  dump_user_location_t (const rtx_insn *insn);
 
   /* Construct from a location_t.  This one is deprecated (since it doesn't
      capture hotness information); it thus needs to be spelled out.  */
@@ -363,7 +363,7 @@ class dump_location_t
   }
 
   /* Construct from a gimple statement (using its location and hotness).  */
-  dump_location_t (gimple *stmt,
+  dump_location_t (const gimple *stmt,
                   const dump_impl_location_t &impl_location
                     = dump_impl_location_t ())
   : m_user_location (dump_user_location_t (stmt)),
@@ -372,7 +372,7 @@ class dump_location_t
   }
 
   /* Construct from an RTL instruction (using its location and hotness).  */
-  dump_location_t (rtx_insn *insn,
+  dump_location_t (const rtx_insn *insn,
                   const dump_impl_location_t &impl_location
                   = dump_impl_location_t ())
   : m_user_location (dump_user_location_t (insn)),