[PATCH] Add rvalue::get_name method (and its C equivalent)
Arthur Cohen
arthur.cohen@embecosm.com
Mon Apr 22 09:51:14 GMT 2024
Hey Guillaume :)
On 4/20/24 01:05, Guillaume Gomez wrote:
> Hi,
>
> I just encountered the need to retrieve the name of an `rvalue` (if
> there is one) while working on the Rust GCC backend.
>
> This patch adds a getter to retrieve the information.
>
> Cordially.
> virtual bool get_wide_int (wide_int *) const { return false; }
>
> + virtual string * get_name () { return NULL; }
> +
> private:
> virtual enum precedence get_precedence () const = 0;
Is there any reason for that getter to return a mutable pointer to the
name? Would something like this work instead if you're just looking at
getting the name?
+ virtual string * get_name () const { return NULL; }
With of course adequate modifications to the inheriting classes.
Best,
Arthur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x1B3465B044AD9C65.asc
Type: application/pgp-keys
Size: 3143 bytes
Desc: OpenPGP public key
URL: <https://gcc.gnu.org/pipermail/jit/attachments/20240422/8db3f808/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/jit/attachments/20240422/8db3f808/attachment.sig>
More information about the Jit
mailing list