aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorLancelot Six <lancelot.six@amd.com>2023-10-13 09:27:48 +0000
committerLancelot Six <lancelot.six@amd.com>2023-11-21 11:52:35 +0000
commit6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b (patch)
tree07259601270022a6cbeb89826560262f015e1589 /gdb/python/python.c
parent6b62451ad08056f0ba02e192ec34ef67c4294ef4 (diff)
downloadfsf-binutils-gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.zip
fsf-binutils-gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.tar.gz
fsf-binutils-gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.tar.bz2
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>
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r--gdb/python/python.c8
1 files changed, 4 insertions, 4 deletions
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<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)