aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorLancelot Six <lancelot.six@amd.com>2023-10-13 13:00:08 +0000
committerLancelot Six <lancelot.six@amd.com>2023-11-21 11:52:36 +0000
commitcc1cc4061bcfb71d99b4e000c0dd0fdd9907a043 (patch)
tree68c74689f1481c483b03a5a54a9501c550635cbc /gdb/dwarf2
parent072f1814d33274c8d5786222680e8eff31bae475 (diff)
downloadgdb-cc1cc4061bcfb71d99b4e000c0dd0fdd9907a043.zip
gdb-cc1cc4061bcfb71d99b4e000c0dd0fdd9907a043.tar.gz
gdb-cc1cc4061bcfb71d99b4e000c0dd0fdd9907a043.tar.bz2
gdb: Use initializers in lambda captures unconditionally
Initializers in lambda captures were introduced in C++14, and conditionally used in gdb/cp-support.c and gdb/dwarf2/cooked-index.c. Since C++17 is now required by GDB, use this feature unconditionally. Change-Id: I87a3d567941e5c71217538fa75c952e4d421fa1d Approved-By: Tom Tromey <tom@tromey.com> Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/cooked-index.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 7c4af3a..10631dc 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -466,12 +466,7 @@ cooked_index::start_writing_index (dwarf2_per_bfd *per_bfd)
started, because it may call 'wait'. */
m_write_future
= gdb::thread_pool::g_thread_pool->post_task ([this, per_bfd,
-#if __cplusplus >= 201402L
- ctx = std::move (ctx)
-#else
- ctx
-#endif
- ] ()
+ ctx = std::move (ctx)] ()
{
maybe_write_index (per_bfd, ctx);
});