[PATCH] compile: Remove non-const reference parameters

Keith Seitz keiths@redhat.com
Thu Aug 30 21:57:00 GMT 2018


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



More information about the Gdb-patches mailing list