+2018-06-28 Martin Liska <mliska@suse.cz>
+
+ * vec.h (class auto_string_vec): New (moved from auto_argvec).
+ (auto_string_vec::~auto_string_vec): Likewise.
+
2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.c (remap_gimple_stmt): Force input_location on the new
+2018-06-28 Martin Liska <mliska@suse.cz>
+
+ * jit-playback.c (class auto_argvec): Moved to vec.h.
+ (auto_argvec::~auto_argvec): Likewise.
+ (compile): Use the renamed name.
+ (invoke_driver): Likewise.
+
2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR jit/84288
m_label_expr = NULL;
}
-/* A subclass of auto_vec <char *> that frees all of its elements on
- deletion. */
-
-class auto_argvec : public auto_vec <char *>
-{
- public:
- ~auto_argvec ();
-};
-
-/* auto_argvec's dtor, freeing all contained strings, automatically
- chaining up to ~auto_vec <char *>, which frees the internal buffer. */
-
-auto_argvec::~auto_argvec ()
-{
- int i;
- char *str;
- FOR_EACH_VEC_ELT (*this, i, str)
- free (str);
-}
-
/* Compile a playback::context:
- Use the context's options to cconstruct command-line options, and
/* Acquire the JIT mutex and set "this" as the active playback ctxt. */
acquire_mutex ();
- auto_argvec fake_args;
+ auto_string_vec fake_args;
make_fake_args (&fake_args, ctxt_progname, &requested_dumps);
if (errors_occurred ())
{
/* Currently this lumps together both assembling and linking into
TV_ASSEMBLE. */
auto_timevar assemble_timevar (get_timer (), tv_id);
- auto_argvec argvec;
+ auto_string_vec argvec;
#define ADD_ARG(arg) argvec.safe_push (xstrdup (arg))
ADD_ARG (gcc_driver_name);
}
+/* A subclass of auto_vec <char *> that frees all of its elements on
+ deletion. */
+
+class auto_string_vec : public auto_vec <char *>
+{
+ public:
+ ~auto_string_vec ();
+};
+
/* Conditionally allocate heap memory for VEC and its internal vector. */
template<typename T>
vec_safe_iterate ((V), (I), &(P)); \
(I)--)
+/* auto_string_vec's dtor, freeing all contained strings, automatically
+ chaining up to ~auto_vec <char *>, which frees the internal buffer. */
+
+inline
+auto_string_vec::~auto_string_vec ()
+{
+ int i;
+ char *str;
+ FOR_EACH_VEC_ELT (*this, i, str)
+ free (str);
+}
+
/* Return a copy of this vector. */