Andrew Burgess 0b72cde372 gdb: add gdb::make_unique function
While GDB is still C++11, lets add a gdb::make_unique template
function that can be used to create std::unique_ptr objects, just like
the C++14 std::make_unique.

If GDB is being compiled with a C++14 compiler then the new
gdb::make_unique function will delegate to the std::make_unique.  I
checked with gcc, and at -O1 and above gdb::make_unique will be
optimised away completely in this case.

If C++14 (or later) becomes our minimum, then it will be easy enough
to go through the code and replace gdb::make_unique with
std::make_unique later on.

I've make use of this function in all the places I think this can
easily be used, though I'm sure I've probably missed some.

Should be no user visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
2023-08-23 09:50:30 +01:00
..
2023-06-05 12:53:15 +02:00
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00
2023-02-24 11:53:03 -07:00
2023-08-12 10:27:57 +09:30
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00
2023-06-03 22:43:57 +02:00

This is a helper library that is used by gdb and gdbserver.

To send patches, follow the gdb patch submission instructions in
../gdb/CONTRIBUTE.  For maintainers, see ../gdb/MAINTAINERS.