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

Tom Tromey tom@tromey.com
Sat Aug 15 19:45:51 GMT 2020


>>>>> "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.

Tom


More information about the Gdb-patches mailing list