* diagnostic.c (build_message_string): Use xvasprintf.
* final.c (output_operand_lossage): Use xvasprintf and xasprintf.
* lto-wrapper.c (merge_and_complain): Use xasprintf.
* targhooks.c (pch_option_mismatch): Ditto.
* tree-ssa-structalias.c (create_function_info_for): Ditto.
(create_variable_info_for_1): Ditto.
From-SVN: r219122
+2014-12-31 Uros Bizjak <ubizjak@gmail.com>
+
+ * diagnostic.c (build_message_string): Use xvasprintf.
+ * final.c (output_operand_lossage): Use xvasprintf and xasprintf.
+ * lto-wrapper.c (merge_and_complain): Use xasprintf.
+ * targhooks.c (pch_option_mismatch): Ditto.
+ * tree-ssa-structalias.c (create_function_info_for): Ditto.
+ (create_variable_info_for_1): Ditto.
+
2014-12-30 Anthony Green <green@moxielogic.com>
* config/moxie/moxie.md (zero_extendqisi2, zero_extendhisi2):
2014-12-22 Martin Liska <mliska@suse.cz>
- * cgraphunit.c (symbol_table::process_new_functions): New inline_summaries
- is used.
+ * cgraphunit.c (symbol_table::process_new_functions): New
+ inline_summaries is used.
* ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
(devirtualization_time_bonus): Likewise.
(estimate_local_effects): Likewise.
is used.
* ipa-polymorphic-call.c: Include of symbol-summary.h is added.
* ipa-profile.c: Include of symbol-summary.h is added.
- * ipa-prop.c (ipa_propagate_indirect_call_infos): New ipa_node_params_sum
- data structure is used.
+ * ipa-prop.c (ipa_propagate_indirect_call_infos): New
+ ipa_node_params_sum data structure is used.
(ipa_node_params::~ipa_node_params): New function.
(ipa_free_all_node_params): Destruction is simplified.
(ipa_node_removal_hook): Removed.
(parser::parse_pattern): Properly allocate capture_ids before
using them. Set capture_ids to zero when its lifetime is
supposed to finish.
- (parser::parse_simplify): Allocate capture_ids only if
- required.
+ (parser::parse_simplify): Allocate capture_ids only if required.
2014-12-16 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
va_list ap;
va_start (ap, msg);
- vasprintf (&str, msg, ap);
+ str = xvasprintf (msg, ap);
va_end (ap);
return str;
va_start (ap, cmsgid);
pfx_str = this_is_asm_operands ? _("invalid 'asm': ") : "output_operand: ";
- asprintf (&fmt_string, "%s%s", pfx_str, _(cmsgid));
- vasprintf (&new_message, fmt_string, ap);
+ fmt_string = xasprintf ("%s%s", pfx_str, _(cmsgid));
+ new_message = xvasprintf (fmt_string, ap);
if (this_is_asm_operands)
error_for_asm (this_is_asm_operands, "%s", new_message);
}
(*decoded_options)[j].opt_index = OPT_O;
char *tem;
- asprintf (&tem, "-O%d", level);
+ tem = xasprintf ("-O%d", level);
(*decoded_options)[j].arg = &tem[2];
(*decoded_options)[j].canonical_option[0] = tem;
(*decoded_options)[j].value = 1;
static const char *
pch_option_mismatch (const char *option)
{
- char *r;
-
- asprintf (&r, _("created and used with differing settings of '%s'"), option);
- if (r == NULL)
- return _("out of memory");
- return r;
+ return xasprintf (_("created and used with differing settings of '%s'"),
+ option);
}
/* Default version of pch_valid_p. */
const char *newname;
char *tempname;
- asprintf (&tempname, "%s.clobber", name);
+ tempname = xasprintf ("%s.clobber", name);
newname = ggc_strdup (tempname);
free (tempname);
prev_vi->next = clobbervi->id;
prev_vi = clobbervi;
- asprintf (&tempname, "%s.use", name);
+ tempname = xasprintf ("%s.use", name);
newname = ggc_strdup (tempname);
free (tempname);
const char *newname;
char *tempname;
- asprintf (&tempname, "%s.chain", name);
+ tempname = xasprintf ("%s.chain", name);
newname = ggc_strdup (tempname);
free (tempname);
if (DECL_RESULT (decl))
resultdecl = DECL_RESULT (decl);
- asprintf (&tempname, "%s.result", name);
+ tempname = xasprintf ("%s.result", name);
newname = ggc_strdup (tempname);
free (tempname);
if (arg)
argdecl = arg;
- asprintf (&tempname, "%s.arg%d", name, i);
+ tempname = xasprintf ("%s.arg%d", name, i);
newname = ggc_strdup (tempname);
free (tempname);
char *tempname;
tree decl;
- asprintf (&tempname, "%s.varargs", name);
+ tempname = xasprintf ("%s.varargs", name);
newname = ggc_strdup (tempname);
free (tempname);
if (dump_file)
{
- asprintf (&tempname, "%s." HOST_WIDE_INT_PRINT_DEC
- "+" HOST_WIDE_INT_PRINT_DEC, name, fo->offset, fo->size);
+ tempname
+ = xasprintf ("%s." HOST_WIDE_INT_PRINT_DEC
+ "+" HOST_WIDE_INT_PRINT_DEC, name,
+ fo->offset, fo->size);
newname = ggc_strdup (tempname);
free (tempname);
}