David: I found back the comment you made. Here it is:

   I see you have patches to add function and variable attributes; I
   wonder if this would be cleaner internally if there was a
   recording::attribute class, rather than the std::pair currently in
   use
   (some attributes have int arguments rather than string, others have
   multiple args).
   
   I also wondered if a "gcc_jit_attribute" type could be exposed to
   the
   user, e.g.:
   
     attr1 = gcc_jit_context_new_attribute (ctxt, "noreturn");
     attr2 = gcc_jit_context_new_attribute_with_string (ctxt, "alias",
   "__foo");
     gcc_jit_function_add_attribute (ctxt, attr1);
     gcc_jit_function_add_attribute (ctxt, attr2);
   
   or somesuch?  But I think the API you currently have is OK. 
   
On Thu, 2023-11-23 at 22:52 +0100, Guillaume Gomez wrote:
> Ping David. :)
> 
> Le mer. 15 nov. 2023 à 17:56, Antoni Boucher <boua...@zoho.com> a
> écrit :
> > 
> > David: another thing I remember you mentioned when you reviewed an
> > earlier version of this patch is the usage of `std::pair`.
> > I can't find where you said that, but I remember you mentioned that
> > we
> > should use a struct instead.
> > Can you please elaborate again?
> > Thanks.
> > 
> > On Wed, 2023-11-15 at 17:53 +0100, Guillaume Gomez wrote:
> > > Hi,
> > > 
> > > This patch adds the (incomplete) support for function and
> > > variable
> > > attributes. The added attributes are the ones we're using in
> > > rustc_codegen_gcc but all the groundwork is done to add more (and
> > > we
> > > will very likely add more as we didn't add all the ones we use in
> > > rustc_codegen_gcc yet).
> > > 
> > > The only big question with this patch is about `inline`. We
> > > currently
> > > handle it as an attribute because it is more convenient for us
> > > but is
> > > it ok or should we create a separate function to mark a function
> > > as
> > > inlined?
> > > 
> > > Thanks in advance for the review.
> > 

Reply via email to