Re: [PATCH 2/8] gdbsupport: Make function arguments constant in enum-flags.h

Andrew Burgess
2020-08-16T09:08:51Z

* Tom Tromey <tom@tromey.com> [2020-08-15 13:45:51 -0600]:

> >>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
>
> Andrew> Make the arguments used for the operators within enum-flags.h constant
> Andrew> references where possible. There should be no user visible changes
> Andrew> after this commit.
>
> enum_flags is a standard layout value-like class. Normally the compiler
> will be able to treat objects of this type as if they were the
> underlying scalar type -- there will be no abstraction penalty, the
> object will be passed in registers, etc.
>
> So, I think it's best not to use references here, unless there's a
> strong reason for it.

Thanks for the feedback. This patch can be dropped from the series.

Andrew