]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/dwarf2ctf.cc
Update copyright years.
[thirdparty/gcc.git] / gcc / dwarf2ctf.cc
index 397100004c21cf9b1bedb92a7ee69414619d2b6b..93e5619933fad2f3d033e00bf54b9efbfa0e2349 100644 (file)
@@ -1,5 +1,5 @@
 /* Generate CTF types and objects from the GCC DWARF.
-   Copyright (C) 2021-2022 Free Software Foundation, Inc.
+   Copyright (C) 2021-2024 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -736,6 +736,7 @@ gen_ctf_enumeration_type (ctf_container_ref ctfc, dw_die_ref enumeration)
 {
   const char *enum_name = get_AT_string (enumeration, DW_AT_name);
   unsigned int bit_size = ctf_die_bitsize (enumeration);
+  unsigned int signedness = get_AT_unsigned (enumeration, DW_AT_encoding);
   int declaration_p = get_AT_flag (enumeration, DW_AT_declaration);
 
   ctf_id_t enumeration_type_id;
@@ -759,7 +760,9 @@ gen_ctf_enumeration_type (ctf_container_ref ctfc, dw_die_ref enumeration)
 
   /* Generate a CTF type for the enumeration.  */
   enumeration_type_id = ctf_add_enum (ctfc, CTF_ADD_ROOT,
-                                     enum_name, bit_size / 8, enumeration);
+                                     enum_name, bit_size / 8,
+                                     (signedness == DW_ATE_unsigned),
+                                     enumeration);
 
   /* Process the enumerators.  */
   {