From 6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b Mon Sep 17 00:00:00 2001 From: Lancelot Six Date: Fri, 13 Oct 2023 09:27:48 +0000 Subject: gdb: Replace gdb::optional with std::optional Since GDB now requires C++17, we don't need the internally maintained gdb::optional implementation. This patch does the following replacing: - gdb::optional -> std::optional - gdb::in_place -> std::in_place - #include "gdbsupport/gdb_optional.h" -> #include This change has mostly been done automatically. One exception is gdbsupport/thread-pool.* which did not use the gdb:: prefix as it already lives in the gdb namespace. Change-Id: I19a92fa03e89637bab136c72e34fd351524f65e9 Approved-By: Tom Tromey Approved-By: Pedro Alves --- gdb/python/python.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/python/python.c') diff --git a/gdb/python/python.c b/gdb/python/python.c index 7e48165..8a36673 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -124,9 +124,9 @@ static void gdbpy_set_quit_flag (const struct extension_language_defn *); static int gdbpy_check_quit_flag (const struct extension_language_defn *); static enum ext_lang_rc gdbpy_before_prompt_hook (const struct extension_language_defn *, const char *current_gdb_prompt); -static gdb::optional gdbpy_colorize +static std::optional gdbpy_colorize (const std::string &filename, const std::string &contents); -static gdb::optional gdbpy_colorize_disasm +static std::optional gdbpy_colorize_disasm (const std::string &content, gdbarch *gdbarch); static ext_lang_missing_debuginfo_result gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang, struct objfile *objfile); @@ -1198,7 +1198,7 @@ gdbpy_before_prompt_hook (const struct extension_language_defn *extlang, /* This is the extension_language_ops.colorize "method". */ -static gdb::optional +static std::optional gdbpy_colorize (const std::string &filename, const std::string &contents) { if (!gdb_python_initialized) @@ -1275,7 +1275,7 @@ gdbpy_colorize (const std::string &filename, const std::string &contents) /* This is the extension_language_ops.colorize_disasm "method". */ -static gdb::optional +static std::optional gdbpy_colorize_disasm (const std::string &content, gdbarch *gdbarch) { if (!gdb_python_initialized) -- cgit v1.1