mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-17 16:18:37 +08:00
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 <optional> 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 <tom@tromey.com> Approved-By: Pedro Alves <pedro@palves.net>
This commit is contained in:
@@ -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<std::string> gdbpy_colorize
|
||||
static std::optional<std::string> gdbpy_colorize
|
||||
(const std::string &filename, const std::string &contents);
|
||||
static gdb::optional<std::string> gdbpy_colorize_disasm
|
||||
static std::optional<std::string> 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<std::string>
|
||||
static std::optional<std::string>
|
||||
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<std::string>
|
||||
static std::optional<std::string>
|
||||
gdbpy_colorize_disasm (const std::string &content, gdbarch *gdbarch)
|
||||
{
|
||||
if (!gdb_python_initialized)
|
||||
|
||||
Reference in New Issue
Block a user