optinfo-emit-json.cc: fix trivial memory leak
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 25 Jul 2018 14:18:22 +0000 (14:18 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 25 Jul 2018 14:18:22 +0000 (14:18 +0000)
gcc/ChangeLog:
* optinfo-emit-json.cc (class optrecord_json_writer): Convert
field "m_scopes" from vec to auto_vec.

From-SVN: r262967

gcc/ChangeLog
gcc/optinfo-emit-json.cc

index fbd9fd6cf37be02b2904c3317e59a68a7b09afab..9e7d32fb420cc7c95bcbea889a85df6e23f32011 100644 (file)
@@ -1,3 +1,8 @@
+2018-07-25  David Malcolm  <dmalcolm@redhat.com>
+
+       * optinfo-emit-json.cc (class optrecord_json_writer): Convert
+       field "m_scopes" from vec to auto_vec.
+
 2018-07-25  Martin Liska  <mliska@suse.cz>
 
        * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
index 6460a812f9e8e09377587a3fb8963b734b2e0fa9..2199d52888b8d2b888ff5d0cf8702501225a0b1b 100644 (file)
@@ -75,7 +75,7 @@ private:
   json::array *m_root_tuple;
 
   /* The currently open scopes, for expressing nested optimization records.  */
-  vec<json::array *> m_scopes;
+  auto_vec<json::array *> m_scopes;
 };
 
 /* optrecord_json_writer's ctor.  Populate the top-level parts of the