diff options
author | Lancelot Six <lancelot.six@amd.com> | 2023-10-13 09:27:48 +0000 |
---|---|---|
committer | Lancelot Six <lancelot.six@amd.com> | 2023-11-21 11:52:35 +0000 |
commit | 6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b (patch) | |
tree | 07259601270022a6cbeb89826560262f015e1589 /gdb/solib-aix.c | |
parent | 6b62451ad08056f0ba02e192ec34ef67c4294ef4 (diff) | |
download | gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.zip gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.tar.gz 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/solib-aix.c')
-rw-r--r-- | gdb/solib-aix.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 0fc3a15..1a70f98 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -65,7 +65,7 @@ struct solib_aix_inferior_data the same principles applied to shared libraries also apply to the main executable. So it's simpler to keep it as part of this list. */ - gdb::optional<std::vector<lm_info_aix>> library_list; + std::optional<std::vector<lm_info_aix>> library_list; }; /* Key to our per-inferior data. */ @@ -91,7 +91,7 @@ get_solib_aix_inferior_data (struct inferior *inf) /* Dummy implementation if XML support is not compiled in. */ -static gdb::optional<std::vector<lm_info_aix>> +static std::optional<std::vector<lm_info_aix>> solib_aix_parse_libraries (const char *library) { static int have_warned; @@ -201,7 +201,7 @@ static const struct gdb_xml_element library_list_elements[] = Return an empty option if the parsing failed. */ -static gdb::optional<std::vector<lm_info_aix>> +static std::optional<std::vector<lm_info_aix>> solib_aix_parse_libraries (const char *library) { std::vector<lm_info_aix> result; @@ -225,7 +225,7 @@ solib_aix_parse_libraries (const char *library) is not NULL, then print a warning including WARNING_MSG and a description of the error. */ -static gdb::optional<std::vector<lm_info_aix>> & +static std::optional<std::vector<lm_info_aix>> & solib_aix_get_library_list (struct inferior *inf, const char *warning_msg) { struct solib_aix_inferior_data *data; @@ -235,7 +235,7 @@ solib_aix_get_library_list (struct inferior *inf, const char *warning_msg) if (data->library_list.has_value ()) return data->library_list; - gdb::optional<gdb::char_vector> library_document + std::optional<gdb::char_vector> library_document = target_read_stralloc (current_inferior ()->top_target (), TARGET_OBJECT_LIBRARIES_AIX, NULL); @@ -421,7 +421,7 @@ solib_aix_solib_create_inferior_hook (int from_tty) /* We need to relocate the main executable... */ - gdb::optional<std::vector<lm_info_aix>> &library_list + std::optional<std::vector<lm_info_aix>> &library_list = solib_aix_get_library_list (current_inferior (), warning_msg); if (!library_list.has_value ()) return; /* Warning already printed. */ @@ -448,7 +448,7 @@ solib_aix_solib_create_inferior_hook (int from_tty) static intrusive_list<shobj> solib_aix_current_sos () { - gdb::optional<std::vector<lm_info_aix>> &library_list + std::optional<std::vector<lm_info_aix>> &library_list = solib_aix_get_library_list (current_inferior (), NULL); if (!library_list.has_value ()) return {}; |