diff mbox

[wide-int] Rename a function to match its type

Message ID 871u2phod4.fsf@talisman.default
State New
Headers show

Commit Message

Richard Sandiford Nov. 9, 2013, 10:16 a.m. UTC
wide_int_type_size_in_bits returns an offset_int (previously an addr_int)
rather than a wide_int, so this patch renames it accordingly.

Tested on powerpc64-linux-gnu and by rerunning the assembly comparison.
OK to install?

Thanks,
Richard

Comments

Kenneth Zadeck Nov. 9, 2013, 2:28 p.m. UTC | #1
On 11/09/2013 05:16 AM, Richard Sandiford wrote:
> wide_int_type_size_in_bits returns an offset_int (previously an addr_int)
> rather than a wide_int, so this patch renames it accordingly.
>
> Tested on powerpc64-linux-gnu and by rerunning the assembly comparison.
> OK to install?
>
> Thanks,
> Richard
>
>
> Index: gcc/dwarf2out.c
> ===================================================================
> --- gcc/dwarf2out.c	2013-11-09 09:39:26.725800817 +0000
> +++ gcc/dwarf2out.c	2013-11-09 09:39:27.938809015 +0000
> @@ -10402,10 +10402,10 @@ simple_type_size_in_bits (const_tree typ
>       return TYPE_ALIGN (type);
>   }
>   
> -/* Similarly, but return a wide_int instead of UHWI.  */
> +/* Similarly, but return an offset_int instead of UHWI.  */
>   
>   static inline offset_int
> -wide_int_type_size_in_bits (const_tree type)
> +offset_int_type_size_in_bits (const_tree type)
>   {
>     if (TREE_CODE (type) == ERROR_MARK)
>       return BITS_PER_WORD;
> @@ -14834,7 +14834,7 @@ field_byte_offset (const_tree decl)
>         offset_int type_size_in_bits;
>   
>         type = field_type (decl);
> -      type_size_in_bits = wide_int_type_size_in_bits (type);
> +      type_size_in_bits = offset_int_type_size_in_bits (type);
>         type_align_in_bits = simple_type_align_in_bits (type);
>   
>         field_size_tree = DECL_SIZE (decl);
fine with me.
Mike Stump Nov. 9, 2013, 4:36 p.m. UTC | #2
On Nov 9, 2013, at 2:16 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
> wide_int_type_size_in_bits returns an offset_int (previously an addr_int)
> rather than a wide_int, so this patch renames it accordingly.

> OK to install?

Ok.
diff mbox

Patch

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	2013-11-09 09:39:26.725800817 +0000
+++ gcc/dwarf2out.c	2013-11-09 09:39:27.938809015 +0000
@@ -10402,10 +10402,10 @@  simple_type_size_in_bits (const_tree typ
     return TYPE_ALIGN (type);
 }
 
-/* Similarly, but return a wide_int instead of UHWI.  */
+/* Similarly, but return an offset_int instead of UHWI.  */
 
 static inline offset_int
-wide_int_type_size_in_bits (const_tree type)
+offset_int_type_size_in_bits (const_tree type)
 {
   if (TREE_CODE (type) == ERROR_MARK)
     return BITS_PER_WORD;
@@ -14834,7 +14834,7 @@  field_byte_offset (const_tree decl)
       offset_int type_size_in_bits;
 
       type = field_type (decl);
-      type_size_in_bits = wide_int_type_size_in_bits (type);
+      type_size_in_bits = offset_int_type_size_in_bits (type);
       type_align_in_bits = simple_type_align_in_bits (type);
 
       field_size_tree = DECL_SIZE (decl);