/* 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.
{
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;
/* 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. */
{