/* Generic code for supporting multiple C++ ABI's
- Copyright (C) 2001-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2022 Free Software Foundation, Inc.
This file is part of GDB.
void
set_cp_abi_as_auto_default (const char *short_name)
{
- char *new_longname, *new_doc;
struct cp_abi_ops *abi = find_cp_abi (short_name);
if (abi == NULL)
auto_cp_abi = *abi;
auto_cp_abi.shortname = "auto";
- new_longname = xstrprintf ("currently \"%s\"", abi->shortname);
- auto_cp_abi.longname = new_longname;
-
- new_doc = xstrprintf ("Automatically selected; currently \"%s\"",
- abi->shortname);
- auto_cp_abi.doc = new_doc;
+ auto_cp_abi.longname = xstrprintf ("currently \"%s\"",
+ abi->shortname).release ();
+ auto_cp_abi.doc = xstrprintf ("Automatically selected; currently \"%s\"",
+ abi->shortname).release ();
/* Since we copy the current ABI into current_cp_abi instead of
using a pointer, if auto is currently the default, we need to