Constify main_name

This patch constifies the return type of main_name.  There is a
comment indicating that this wasn't possible at some point in the
past, but whatever the barrier was, it is gone now.

Tested by rebuilding.

gdb/ChangeLog
2019-07-18  Tom Tromey  <tromey@adacore.com>

	* symtab.c (main_name): Constify return type.
	* symfile.c (set_initial_language): Update.
	* symtab.h (main_name): Constify return type.
This commit is contained in:
Tom Tromey
2019-07-18 09:29:15 -06:00
parent 54d7dae59a
commit cd215b2eb7
4 changed files with 13 additions and 8 deletions

View File

@@ -5741,8 +5741,10 @@ find_main_name (void)
set_main_name ("main", language_unknown);
}
char *
main_name (void)
/* See symtab.h. */
const char *
main_name ()
{
struct main_info *info = get_main_info ();