]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use string_view in quirk_rust_enum
authorTom Tromey <tromey@adacore.com>
Wed, 14 Feb 2024 15:00:03 +0000 (08:00 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 18 Mar 2024 14:10:06 +0000 (08:10 -0600)
commit2b5f0fe3230f707ab736d759af4bf436d2c43837
tree850ef712e8122c65b3bdeba5f2c947ecba9de4a7
parenta8e1e2aaf8783092b74330e2d4c727f814533cc9
Use string_view in quirk_rust_enum

quirk_rust_enum makes string copies to store in an unordered_map.
However, the original strings have an appropriate lifetime, and so no
copying is needed.  With C++17, we can rely on string_view having a
std::hash specialization, so this patch changes this code to use
string_view rather than string.
gdb/dwarf2/read.c