diff mbox series

Fixes documentation for gimple_assign functions

Message ID 4bb6d814-bc2d-9c40-0e32-6bce362e0e2c@theobroma-systems.com
State New
Headers show
Series Fixes documentation for gimple_assign functions | expand

Commit Message

Erick Ochoa May 16, 2020, 9:42 a.m. UTC
Fixes documentation for gimple_assign functions

This patch corrects the documented function signatures of gimple_assign* 
functions.

ChangeLog:

2020-05-16  Erick Ochoa <erick.ochoa@theobroma-systems.com>

	* gcc/gimple.h (gimple_assign_rhs_code): Fix signature
	(gimple_assign_rhs_class): same
	(gimple_assign_lhs): same
	(gimple_assign_lhs_ptr): same
	(gimple_assign_rhs): same
	(gimple_assign_rhs_ptr): same
	(gimple_assign_rhs2): same
	(gimple_assign_rh2_ptr): same
	(gimple_assign_rhs3): same
	(gimple_assign_rh3_ptr): same
	(gimple_assign_set_lhs): same
	(gimple_assign_set_rhs1): same
	(gimple_assign_set_rhs2): same
	(gimple_assign_set_rhs3): same
	(gimple_assign_cast_p): same

+@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple *g, 
tree rhs)
  Set @code{RHS} to be the second operand on the @code{RHS} of assignment
  statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple g, 
tree rhs)
+@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple *g, 
tree rhs)
  Set @code{RHS} to be the third operand on the @code{RHS} of assignment
  statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple s)
+@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const gimple *s)
  Return true if @code{S} is a type-cast assignment.
  @end deftypefn

Comments

Richard Biener May 16, 2020, 5:57 p.m. UTC | #1
On May 16, 2020 11:42:02 AM GMT+02:00, Erick Ochoa <erick.ochoa@theobroma-systems.com> wrote:
>Fixes documentation for gimple_assign functions
>
>This patch corrects the documented function signatures of
>gimple_assign* 
>functions.

OK. 

Richard. 

>ChangeLog:
>
>2020-05-16  Erick Ochoa <erick.ochoa@theobroma-systems.com>
>
>	* gcc/gimple.h (gimple_assign_rhs_code): Fix signature
>	(gimple_assign_rhs_class): same
>	(gimple_assign_lhs): same
>	(gimple_assign_lhs_ptr): same
>	(gimple_assign_rhs): same
>	(gimple_assign_rhs_ptr): same
>	(gimple_assign_rhs2): same
>	(gimple_assign_rh2_ptr): same
>	(gimple_assign_rhs3): same
>	(gimple_assign_rh3_ptr): same
>	(gimple_assign_set_lhs): same
>	(gimple_assign_set_rhs1): same
>	(gimple_assign_set_rhs2): same
>	(gimple_assign_set_rhs3): same
>	(gimple_assign_cast_p): same
>
>diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi
>index 5e0fc2e0dc5..18264871e88 100644
>--- a/gcc/doc/gimple.texi
>+++ b/gcc/doc/gimple.texi
>@@ -1184,73 +1184,73 @@ case they will be converted to a gimple operand
>
>if necessary.
>
>  This function returns the newly created @code{GIMPLE_ASSIGN} tuple.
>
>-@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code 
>(gimple g)
>+@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code 
>(const gimple *g)
>  Return the code of the expression computed on the @code{RHS} of
>  assignment statement @code{G}.
>  @end deftypefn
>
>
>-@deftypefn {GIMPLE function} {enum gimple_rhs_class} 
>gimple_assign_rhs_class (gimple g)
>+@deftypefn {GIMPLE function} {enum gimple_rhs_class} 
>gimple_assign_rhs_class (const gimple *g)
>  Return the gimple rhs class of the code for the expression
> computed on the rhs of assignment statement @code{G}.  This will never
>  return @code{GIMPLE_INVALID_RHS}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} tree gimple_assign_lhs (gimple g)
>+@deftypefn {GIMPLE function} tree gimple_assign_lhs (const gimple *g)
>  Return the @code{LHS} of assignment statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple g)
>+@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple
>*g)
>  Return a pointer to the @code{LHS} of assignment statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (gimple g)
>+@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (const gimple *g)
>  Return the first operand on the @code{RHS} of assignment statement 
>@code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple
>g)
>+@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple
>*g)
>Return the address of the first operand on the @code{RHS} of assignment
>  statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (gimple g)
>+@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (const gimple *g)
>  Return the second operand on the @code{RHS} of assignment statement 
>@code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple
>g)
>+@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple
>*g)
>Return the address of the second operand on the @code{RHS} of
>assignment
>  statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (gimple g)
>+@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (const gimple *g)
>  Return the third operand on the @code{RHS} of assignment statement 
>@code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple
>g)
>+@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple
>*g)
>Return the address of the third operand on the @code{RHS} of assignment
>  statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple g,
>tree 
>lhs)
>+@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple *g, 
>tree lhs)
>  Set @code{LHS} to be the @code{LHS} operand of assignment statement 
>@code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple g, 
>tree rhs)
>+@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple *g, 
>tree rhs)
> Set @code{RHS} to be the first operand on the @code{RHS} of assignment
>  statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple g, 
>tree rhs)
>+@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple *g, 
>tree rhs)
>Set @code{RHS} to be the second operand on the @code{RHS} of assignment
>  statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple g, 
>tree rhs)
>+@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple *g, 
>tree rhs)
> Set @code{RHS} to be the third operand on the @code{RHS} of assignment
>  statement @code{G}.
>  @end deftypefn
>
>-@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple
>s)
>+@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const gimple
>*s)
>  Return true if @code{S} is a type-cast assignment.
>  @end deftypefn
Erick Ochoa May 18, 2020, 4:44 p.m. UTC | #2
Hi,

I do not have write permissions. I was wondering if I could get write 
after approval permissions. I'm new to GCC but I would like to 
contribute as much as I can, even if it is just small fixes on 
documentations like the ones discussed here.

Thanks!

On 16/05/2020 19:57, Richard Biener wrote:
> On May 16, 2020 11:42:02 AM GMT+02:00, Erick Ochoa <erick.ochoa@theobroma-systems.com> wrote:
>> Fixes documentation for gimple_assign functions
>>
>> This patch corrects the documented function signatures of
>> gimple_assign*
>> functions.
> 
> OK.
> 
> Richard.
> 
>> ChangeLog:
>>
>> 2020-05-16  Erick Ochoa <erick.ochoa@theobroma-systems.com>
>>
>> 	* gcc/gimple.h (gimple_assign_rhs_code): Fix signature
>> 	(gimple_assign_rhs_class): same
>> 	(gimple_assign_lhs): same
>> 	(gimple_assign_lhs_ptr): same
>> 	(gimple_assign_rhs): same
>> 	(gimple_assign_rhs_ptr): same
>> 	(gimple_assign_rhs2): same
>> 	(gimple_assign_rh2_ptr): same
>> 	(gimple_assign_rhs3): same
>> 	(gimple_assign_rh3_ptr): same
>> 	(gimple_assign_set_lhs): same
>> 	(gimple_assign_set_rhs1): same
>> 	(gimple_assign_set_rhs2): same
>> 	(gimple_assign_set_rhs3): same
>> 	(gimple_assign_cast_p): same
>>
>> diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi
>> index 5e0fc2e0dc5..18264871e88 100644
>> --- a/gcc/doc/gimple.texi
>> +++ b/gcc/doc/gimple.texi
>> @@ -1184,73 +1184,73 @@ case they will be converted to a gimple operand
>>
>> if necessary.
>>
>>   This function returns the newly created @code{GIMPLE_ASSIGN} tuple.
>>
>> -@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code
>> (gimple g)
>> +@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code
>> (const gimple *g)
>>   Return the code of the expression computed on the @code{RHS} of
>>   assignment statement @code{G}.
>>   @end deftypefn
>>
>>
>> -@deftypefn {GIMPLE function} {enum gimple_rhs_class}
>> gimple_assign_rhs_class (gimple g)
>> +@deftypefn {GIMPLE function} {enum gimple_rhs_class}
>> gimple_assign_rhs_class (const gimple *g)
>>   Return the gimple rhs class of the code for the expression
>> computed on the rhs of assignment statement @code{G}.  This will never
>>   return @code{GIMPLE_INVALID_RHS}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} tree gimple_assign_lhs (gimple g)
>> +@deftypefn {GIMPLE function} tree gimple_assign_lhs (const gimple *g)
>>   Return the @code{LHS} of assignment statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple g)
>> +@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple
>> *g)
>>   Return a pointer to the @code{LHS} of assignment statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (gimple g)
>> +@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (const gimple *g)
>>   Return the first operand on the @code{RHS} of assignment statement
>> @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple
>> g)
>> +@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple
>> *g)
>> Return the address of the first operand on the @code{RHS} of assignment
>>   statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (gimple g)
>> +@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (const gimple *g)
>>   Return the second operand on the @code{RHS} of assignment statement
>> @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple
>> g)
>> +@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple
>> *g)
>> Return the address of the second operand on the @code{RHS} of
>> assignment
>>   statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (gimple g)
>> +@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (const gimple *g)
>>   Return the third operand on the @code{RHS} of assignment statement
>> @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple
>> g)
>> +@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple
>> *g)
>> Return the address of the third operand on the @code{RHS} of assignment
>>   statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple g,
>> tree
>> lhs)
>> +@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple *g,
>> tree lhs)
>>   Set @code{LHS} to be the @code{LHS} operand of assignment statement
>> @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple g,
>> tree rhs)
>> +@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple *g,
>> tree rhs)
>> Set @code{RHS} to be the first operand on the @code{RHS} of assignment
>>   statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple g,
>> tree rhs)
>> +@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple *g,
>> tree rhs)
>> Set @code{RHS} to be the second operand on the @code{RHS} of assignment
>>   statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple g,
>> tree rhs)
>> +@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple *g,
>> tree rhs)
>> Set @code{RHS} to be the third operand on the @code{RHS} of assignment
>>   statement @code{G}.
>>   @end deftypefn
>>
>> -@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple
>> s)
>> +@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const gimple
>> *s)
>>   Return true if @code{S} is a type-cast assignment.
>>   @end deftypefn
>
diff mbox series

Patch

diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi
index 5e0fc2e0dc5..18264871e88 100644
--- a/gcc/doc/gimple.texi
+++ b/gcc/doc/gimple.texi
@@ -1184,73 +1184,73 @@  case they will be converted to a gimple operand 
if necessary.

  This function returns the newly created @code{GIMPLE_ASSIGN} tuple.

-@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code 
(gimple g)
+@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code 
(const gimple *g)
  Return the code of the expression computed on the @code{RHS} of
  assignment statement @code{G}.
  @end deftypefn


-@deftypefn {GIMPLE function} {enum gimple_rhs_class} 
gimple_assign_rhs_class (gimple g)
+@deftypefn {GIMPLE function} {enum gimple_rhs_class} 
gimple_assign_rhs_class (const gimple *g)
  Return the gimple rhs class of the code for the expression
  computed on the rhs of assignment statement @code{G}.  This will never
  return @code{GIMPLE_INVALID_RHS}.
  @end deftypefn

-@deftypefn {GIMPLE function} tree gimple_assign_lhs (gimple g)
+@deftypefn {GIMPLE function} tree gimple_assign_lhs (const gimple *g)
  Return the @code{LHS} of assignment statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple g)
+@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple *g)
  Return a pointer to the @code{LHS} of assignment statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (gimple g)
+@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (const gimple *g)
  Return the first operand on the @code{RHS} of assignment statement 
@code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple g)
+@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple *g)
  Return the address of the first operand on the @code{RHS} of assignment
  statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (gimple g)
+@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (const gimple *g)
  Return the second operand on the @code{RHS} of assignment statement 
@code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple g)
+@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple *g)
  Return the address of the second operand on the @code{RHS} of assignment
  statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (gimple g)
+@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (const gimple *g)
  Return the third operand on the @code{RHS} of assignment statement 
@code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple g)
+@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple *g)
  Return the address of the third operand on the @code{RHS} of assignment
  statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple g, tree 
lhs)
+@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple *g, 
tree lhs)
  Set @code{LHS} to be the @code{LHS} operand of assignment statement 
@code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple g, 
tree rhs)
+@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple *g, 
tree rhs)
  Set @code{RHS} to be the first operand on the @code{RHS} of assignment
  statement @code{G}.
  @end deftypefn

-@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple g, 
tree rhs)