Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Guillaume Gomez
`param` is also inheriting from `lvalue`. I don't think adding this check is a good idea because it will not evolve nicely if more changes are done in libgccjit. Le lun. 22 avr. 2024 à 17:19, Antoni Boucher a écrit : > > For your new API endpoint, please add a check like: > >RETURN_IF_FAIL

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Guillaume Gomez
Good point! New patch attached. Le lun. 22 avr. 2024 à 15:13, Antoni Boucher a écrit : > > Please move the function to be on lvalue since there are no rvalue types > that are not lvalues that have a name. > > Le 2024-04-22 à 09 h 04, Guillaume Gomez a écrit : > > Hey Arthur :) > > > >> Is there

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Guillaume Gomez
... I most definitely forgot. Thanks! ^^' Le lun. 22 avr. 2024 à 15:19, Antoni Boucher a écrit : > I believe you forgot to regenerate the ChangeLog. > > Le 2024-04-22 à 09 h 16, Guillaume Gomez a écrit : > > Good point! > > > > New patch attached. > > > > Le lun. 22 avr. 2024 à 15:13, Antoni

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Antoni Boucher
For your new API endpoint, please add a check like: RETURN_IF_FAIL (lvalue->is_global () || lvalue->is_local (), NULL, NULL, "lvalue should be a variable"); Le 2024-04-22 à 09 h 16, Guillaume Gomez a écrit : Good point! New patch

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Antoni Boucher
I believe you forgot to regenerate the ChangeLog. Le 2024-04-22 à 09 h 16, Guillaume Gomez a écrit : Good point! New patch attached. Le lun. 22 avr. 2024 à 15:13, Antoni Boucher a écrit : Please move the function to be on lvalue since there are no rvalue types that are not lvalues that

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Antoni Boucher
Please move the function to be on lvalue since there are no rvalue types that are not lvalues that have a name. Le 2024-04-22 à 09 h 04, Guillaume Gomez a écrit : Hey Arthur :) Is there any reason for that getter to return a mutable pointer to the name? Would something like this work instead

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Guillaume Gomez
Hey Arthur :) > 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

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Arthur Cohen
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 *)

[PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-19 Thread Guillaume Gomez
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. From d2ddeec950f23533e5e18bc0c10c4b49eef3cda3 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat,