This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] compile: Remove non-const reference parameters
- From: Keith Seitz <keiths at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Thu, 30 Aug 2018 14:57:14 -0700
- Subject: Re: [PATCH] compile: Remove non-const reference parameters
- References: <1535647635-9566-1-git-send-email-simon.marchi@ericsson.com>
On 08/30/2018 09:47 AM, Simon Marchi wrote:
>
> I'd say all the changes are pretty obvious, except the one in
> compile_cplus_instance::enter_scope which might require more attention.
That scope-handling code is a little bit of a mess, given that it was written,
and then rewritten, right as we were moving from C -> C++03 -> C++11. So I
had no access to unique_ptrs.
Nonetheless, the intent is that a scope is created and control of that object
is then handed over to the compile_cplus_instance entirely. So your patch
LGTM.
With access to C++11 that we enjoy today, I might have written this
interface quite a bit differently...
Keith