1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Move the DWARF attribute constants into Dwarf.def and delete 300 lines of silly code.

llvm-svn: 285425
This commit is contained in:
Adrian Prantl 2016-10-28 18:21:39 +00:00
parent fcada89b82
commit 9f0ded5064
3 changed files with 224 additions and 403 deletions

View File

@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
// TODO: Add other DW-based macros.
#if !(defined HANDLE_DW_TAG || defined HANDLE_DW_OP || \
#if !(defined HANDLE_DW_TAG || defined HANDLE_DW_AT || defined HANDLE_DW_OP || \
defined HANDLE_DW_LANG || defined HANDLE_DW_ATE || \
defined HANDLE_DW_VIRTUALITY || defined HANDLE_DW_DEFAULTED || \
defined HANDLE_DW_CC || defined HANDLE_DW_LNCT || \
@ -24,6 +24,10 @@
#define HANDLE_DW_TAG(ID, NAME)
#endif
#ifndef HANDLE_DW_AT
#define HANDLE_DW_AT(ID, NAME)
#endif
#ifndef HANDLE_DW_OP
#define HANDLE_DW_OP(ID, NAME)
#endif
@ -147,6 +151,215 @@ HANDLE_DW_TAG(0xb002, BORLAND_Delphi_dynamic_array)
HANDLE_DW_TAG(0xb003, BORLAND_Delphi_set)
HANDLE_DW_TAG(0xb004, BORLAND_Delphi_variant)
// Attributes.
HANDLE_DW_AT(0x01, sibling)
HANDLE_DW_AT(0x02, location)
HANDLE_DW_AT(0x03, name)
HANDLE_DW_AT(0x09, ordering)
HANDLE_DW_AT(0x0b, byte_size)
HANDLE_DW_AT(0x0c, bit_offset)
HANDLE_DW_AT(0x0d, bit_size)
HANDLE_DW_AT(0x10, stmt_list)
HANDLE_DW_AT(0x11, low_pc)
HANDLE_DW_AT(0x12, high_pc)
HANDLE_DW_AT(0x13, language)
HANDLE_DW_AT(0x15, discr)
HANDLE_DW_AT(0x16, discr_value)
HANDLE_DW_AT(0x17, visibility)
HANDLE_DW_AT(0x18, import)
HANDLE_DW_AT(0x19, string_length)
HANDLE_DW_AT(0x1a, common_reference)
HANDLE_DW_AT(0x1b, comp_dir)
HANDLE_DW_AT(0x1c, const_value)
HANDLE_DW_AT(0x1d, containing_type)
HANDLE_DW_AT(0x1e, default_value)
HANDLE_DW_AT(0x20, inline)
HANDLE_DW_AT(0x21, is_optional)
HANDLE_DW_AT(0x22, lower_bound)
HANDLE_DW_AT(0x25, producer)
HANDLE_DW_AT(0x27, prototyped)
HANDLE_DW_AT(0x2a, return_addr)
HANDLE_DW_AT(0x2c, start_scope)
HANDLE_DW_AT(0x2e, bit_stride)
HANDLE_DW_AT(0x2f, upper_bound)
HANDLE_DW_AT(0x31, abstract_origin)
HANDLE_DW_AT(0x32, accessibility)
HANDLE_DW_AT(0x33, address_class)
HANDLE_DW_AT(0x34, artificial)
HANDLE_DW_AT(0x35, base_types)
HANDLE_DW_AT(0x36, calling_convention)
HANDLE_DW_AT(0x37, count)
HANDLE_DW_AT(0x38, data_member_location)
HANDLE_DW_AT(0x39, decl_column)
HANDLE_DW_AT(0x3a, decl_file)
HANDLE_DW_AT(0x3b, decl_line)
HANDLE_DW_AT(0x3c, declaration)
HANDLE_DW_AT(0x3d, discr_list)
HANDLE_DW_AT(0x3e, encoding)
HANDLE_DW_AT(0x3f, external)
HANDLE_DW_AT(0x40, frame_base)
HANDLE_DW_AT(0x41, friend)
HANDLE_DW_AT(0x42, identifier_case)
HANDLE_DW_AT(0x43, macro_info)
HANDLE_DW_AT(0x44, namelist_item)
HANDLE_DW_AT(0x45, priority)
HANDLE_DW_AT(0x46, segment)
HANDLE_DW_AT(0x47, specification)
HANDLE_DW_AT(0x48, static_link)
HANDLE_DW_AT(0x49, type)
HANDLE_DW_AT(0x4a, use_location)
HANDLE_DW_AT(0x4b, variable_parameter)
HANDLE_DW_AT(0x4c, virtuality)
HANDLE_DW_AT(0x4d, vtable_elem_location)
HANDLE_DW_AT(0x4e, allocated)
HANDLE_DW_AT(0x4f, associated)
HANDLE_DW_AT(0x50, data_location)
HANDLE_DW_AT(0x51, byte_stride)
HANDLE_DW_AT(0x52, entry_pc)
HANDLE_DW_AT(0x53, use_UTF8)
HANDLE_DW_AT(0x54, extension)
HANDLE_DW_AT(0x55, ranges)
HANDLE_DW_AT(0x56, trampoline)
HANDLE_DW_AT(0x57, call_column)
HANDLE_DW_AT(0x58, call_file)
HANDLE_DW_AT(0x59, call_line)
HANDLE_DW_AT(0x5a, description)
HANDLE_DW_AT(0x5b, binary_scale)
HANDLE_DW_AT(0x5c, decimal_scale)
HANDLE_DW_AT(0x5d, small)
HANDLE_DW_AT(0x5e, decimal_sign)
HANDLE_DW_AT(0x5f, digit_count)
HANDLE_DW_AT(0x60, picture_string)
HANDLE_DW_AT(0x61, mutable)
HANDLE_DW_AT(0x62, threads_scaled)
HANDLE_DW_AT(0x63, explicit)
HANDLE_DW_AT(0x64, object_pointer)
HANDLE_DW_AT(0x65, endianity)
HANDLE_DW_AT(0x66, elemental)
HANDLE_DW_AT(0x67, pure)
HANDLE_DW_AT(0x68, recursive)
HANDLE_DW_AT(0x69, signature)
HANDLE_DW_AT(0x6a, main_subprogram)
HANDLE_DW_AT(0x6b, data_bit_offset)
HANDLE_DW_AT(0x6c, const_expr)
HANDLE_DW_AT(0x6d, enum_class)
HANDLE_DW_AT(0x6e, linkage_name)
// New in DWARF 5:
HANDLE_DW_AT(0x6f, string_length_bit_size)
HANDLE_DW_AT(0x70, string_length_byte_size)
HANDLE_DW_AT(0x71, rank)
HANDLE_DW_AT(0x72, str_offsets_base)
HANDLE_DW_AT(0x73, addr_base)
HANDLE_DW_AT(0x74, rnglists_base)
HANDLE_DW_AT(0x75, dwo_id) ///< Retracted from DWARF 5.
HANDLE_DW_AT(0x76, dwo_name)
HANDLE_DW_AT(0x77, reference)
HANDLE_DW_AT(0x78, rvalue_reference)
HANDLE_DW_AT(0x79, macros)
HANDLE_DW_AT(0x7a, call_all_calls)
HANDLE_DW_AT(0x7b, call_all_source_calls)
HANDLE_DW_AT(0x7c, call_all_tail_calls)
HANDLE_DW_AT(0x7d, call_return_pc)
HANDLE_DW_AT(0x7e, call_value)
HANDLE_DW_AT(0x7f, call_origin)
HANDLE_DW_AT(0x80, call_parameter)
HANDLE_DW_AT(0x81, call_pc)
HANDLE_DW_AT(0x82, call_tail_call)
HANDLE_DW_AT(0x83, call_target)
HANDLE_DW_AT(0x84, call_target_clobbered)
HANDLE_DW_AT(0x85, call_data_location)
HANDLE_DW_AT(0x86, call_data_value)
HANDLE_DW_AT(0x87, noreturn)
HANDLE_DW_AT(0x88, alignment)
HANDLE_DW_AT(0x89, export_symbols)
HANDLE_DW_AT(0x8a, deleted)
HANDLE_DW_AT(0x8b, defaulted)
HANDLE_DW_AT(0x8c, loclists_base)
HANDLE_DW_AT(0x2002, MIPS_loop_begin)
HANDLE_DW_AT(0x2003, MIPS_tail_loop_begin)
HANDLE_DW_AT(0x2004, MIPS_epilog_begin)
HANDLE_DW_AT(0x2005, MIPS_loop_unroll_factor)
HANDLE_DW_AT(0x2006, MIPS_software_pipeline_depth)
HANDLE_DW_AT(0x2007, MIPS_linkage_name)
HANDLE_DW_AT(0x2008, MIPS_stride)
HANDLE_DW_AT(0x2009, MIPS_abstract_name)
HANDLE_DW_AT(0x200a, MIPS_clone_origin)
HANDLE_DW_AT(0x200b, MIPS_has_inlines)
HANDLE_DW_AT(0x200c, MIPS_stride_byte)
HANDLE_DW_AT(0x200d, MIPS_stride_elem)
HANDLE_DW_AT(0x200e, MIPS_ptr_dopetype)
HANDLE_DW_AT(0x200f, MIPS_allocatable_dopetype)
HANDLE_DW_AT(0x2010, MIPS_assumed_shape_dopetype)
// This one appears to have only been implemented by Open64 for
// fortran and may conflict with other extensions.
HANDLE_DW_AT(0x2011, MIPS_assumed_size)
// GNU extensions
HANDLE_DW_AT(0x2101, sf_names)
HANDLE_DW_AT(0x2102, src_info)
HANDLE_DW_AT(0x2103, mac_info)
HANDLE_DW_AT(0x2104, src_coords)
HANDLE_DW_AT(0x2105, body_begin)
HANDLE_DW_AT(0x2106, body_end)
HANDLE_DW_AT(0x2107, GNU_vector)
HANDLE_DW_AT(0x2110, GNU_template_name)
HANDLE_DW_AT(0x210f, GNU_odr_signature)
HANDLE_DW_AT(0x2119, GNU_macros)
// Extensions for Fission proposal.
HANDLE_DW_AT(0x2130, GNU_dwo_name)
HANDLE_DW_AT(0x2131, GNU_dwo_id)
HANDLE_DW_AT(0x2132, GNU_ranges_base)
HANDLE_DW_AT(0x2133, GNU_addr_base)
HANDLE_DW_AT(0x2134, GNU_pubnames)
HANDLE_DW_AT(0x2135, GNU_pubtypes)
HANDLE_DW_AT(0x2136, GNU_discriminator)
// Borland extensions.
HANDLE_DW_AT(0x3b11, BORLAND_property_read)
HANDLE_DW_AT(0x3b12, BORLAND_property_write)
HANDLE_DW_AT(0x3b13, BORLAND_property_implements)
HANDLE_DW_AT(0x3b14, BORLAND_property_index)
HANDLE_DW_AT(0x3b15, BORLAND_property_default)
HANDLE_DW_AT(0x3b20, BORLAND_Delphi_unit)
HANDLE_DW_AT(0x3b21, BORLAND_Delphi_class)
HANDLE_DW_AT(0x3b22, BORLAND_Delphi_record)
HANDLE_DW_AT(0x3b23, BORLAND_Delphi_metaclass)
HANDLE_DW_AT(0x3b24, BORLAND_Delphi_constructor)
HANDLE_DW_AT(0x3b25, BORLAND_Delphi_destructor)
HANDLE_DW_AT(0x3b26, BORLAND_Delphi_anonymous_method)
HANDLE_DW_AT(0x3b27, BORLAND_Delphi_interface)
HANDLE_DW_AT(0x3b28, BORLAND_Delphi_ABI)
HANDLE_DW_AT(0x3b29, BORLAND_Delphi_return)
HANDLE_DW_AT(0x3b30, BORLAND_Delphi_frameptr)
HANDLE_DW_AT(0x3b31, BORLAND_closure)
// LLVM project extensions.
HANDLE_DW_AT(0x3e00, LLVM_include_path)
HANDLE_DW_AT(0x3e01, LLVM_config_macros)
HANDLE_DW_AT(0x3e02, LLVM_isysroot)
// Apple extensions.
HANDLE_DW_AT(0x3fe1, APPLE_optimized)
HANDLE_DW_AT(0x3fe2, APPLE_flags)
HANDLE_DW_AT(0x3fe3, APPLE_isa)
HANDLE_DW_AT(0x3fe4, APPLE_block)
HANDLE_DW_AT(0x3fe5, APPLE_major_runtime_vers)
HANDLE_DW_AT(0x3fe6, APPLE_runtime_class)
HANDLE_DW_AT(0x3fe7, APPLE_omit_frame_ptr)
HANDLE_DW_AT(0x3fe8, APPLE_property_name)
HANDLE_DW_AT(0x3fe9, APPLE_property_getter)
HANDLE_DW_AT(0x3fea, APPLE_property_setter)
HANDLE_DW_AT(0x3feb, APPLE_property_attribute)
HANDLE_DW_AT(0x3fec, APPLE_objc_complete_type)
HANDLE_DW_AT(0x3fed, APPLE_property)
// DWARF Expression operators.
HANDLE_DW_OP(0x03, addr)
HANDLE_DW_OP(0x06, deref)
HANDLE_DW_OP(0x08, const1u)
@ -442,6 +655,7 @@ HANDLE_DW_RLE(0x06, DW_RLE_start_end)
HANDLE_DW_RLE(0x07, DW_RLE_start_length)
#undef HANDLE_DW_TAG
#undef HANDLE_DW_AT
#undef HANDLE_DW_OP
#undef HANDLE_DW_LANG
#undef HANDLE_DW_ATE

View File

@ -90,216 +90,12 @@ inline bool isType(Tag T) {
}
}
/// Attributes.
enum Attribute : uint16_t {
// Attributes
DW_AT_sibling = 0x01,
DW_AT_location = 0x02,
DW_AT_name = 0x03,
DW_AT_ordering = 0x09,
DW_AT_byte_size = 0x0b,
DW_AT_bit_offset = 0x0c,
DW_AT_bit_size = 0x0d,
DW_AT_stmt_list = 0x10,
DW_AT_low_pc = 0x11,
DW_AT_high_pc = 0x12,
DW_AT_language = 0x13,
DW_AT_discr = 0x15,
DW_AT_discr_value = 0x16,
DW_AT_visibility = 0x17,
DW_AT_import = 0x18,
DW_AT_string_length = 0x19,
DW_AT_common_reference = 0x1a,
DW_AT_comp_dir = 0x1b,
DW_AT_const_value = 0x1c,
DW_AT_containing_type = 0x1d,
DW_AT_default_value = 0x1e,
DW_AT_inline = 0x20,
DW_AT_is_optional = 0x21,
DW_AT_lower_bound = 0x22,
DW_AT_producer = 0x25,
DW_AT_prototyped = 0x27,
DW_AT_return_addr = 0x2a,
DW_AT_start_scope = 0x2c,
DW_AT_bit_stride = 0x2e,
DW_AT_upper_bound = 0x2f,
DW_AT_abstract_origin = 0x31,
DW_AT_accessibility = 0x32,
DW_AT_address_class = 0x33,
DW_AT_artificial = 0x34,
DW_AT_base_types = 0x35,
DW_AT_calling_convention = 0x36,
DW_AT_count = 0x37,
DW_AT_data_member_location = 0x38,
DW_AT_decl_column = 0x39,
DW_AT_decl_file = 0x3a,
DW_AT_decl_line = 0x3b,
DW_AT_declaration = 0x3c,
DW_AT_discr_list = 0x3d,
DW_AT_encoding = 0x3e,
DW_AT_external = 0x3f,
DW_AT_frame_base = 0x40,
DW_AT_friend = 0x41,
DW_AT_identifier_case = 0x42,
DW_AT_macro_info = 0x43,
DW_AT_namelist_item = 0x44,
DW_AT_priority = 0x45,
DW_AT_segment = 0x46,
DW_AT_specification = 0x47,
DW_AT_static_link = 0x48,
DW_AT_type = 0x49,
DW_AT_use_location = 0x4a,
DW_AT_variable_parameter = 0x4b,
DW_AT_virtuality = 0x4c,
DW_AT_vtable_elem_location = 0x4d,
DW_AT_allocated = 0x4e,
DW_AT_associated = 0x4f,
DW_AT_data_location = 0x50,
DW_AT_byte_stride = 0x51,
DW_AT_entry_pc = 0x52,
DW_AT_use_UTF8 = 0x53,
DW_AT_extension = 0x54,
DW_AT_ranges = 0x55,
DW_AT_trampoline = 0x56,
DW_AT_call_column = 0x57,
DW_AT_call_file = 0x58,
DW_AT_call_line = 0x59,
DW_AT_description = 0x5a,
DW_AT_binary_scale = 0x5b,
DW_AT_decimal_scale = 0x5c,
DW_AT_small = 0x5d,
DW_AT_decimal_sign = 0x5e,
DW_AT_digit_count = 0x5f,
DW_AT_picture_string = 0x60,
DW_AT_mutable = 0x61,
DW_AT_threads_scaled = 0x62,
DW_AT_explicit = 0x63,
DW_AT_object_pointer = 0x64,
DW_AT_endianity = 0x65,
DW_AT_elemental = 0x66,
DW_AT_pure = 0x67,
DW_AT_recursive = 0x68,
DW_AT_signature = 0x69,
DW_AT_main_subprogram = 0x6a,
DW_AT_data_bit_offset = 0x6b,
DW_AT_const_expr = 0x6c,
DW_AT_enum_class = 0x6d,
DW_AT_linkage_name = 0x6e,
// New in DWARF 5:
DW_AT_string_length_bit_size = 0x6f,
DW_AT_string_length_byte_size = 0x70,
DW_AT_rank = 0x71,
DW_AT_str_offsets_base = 0x72,
DW_AT_addr_base = 0x73,
DW_AT_rnglists_base = 0x74,
DW_AT_dwo_id = 0x75, ///< Retracted from DWARF 5.
DW_AT_dwo_name = 0x76,
DW_AT_reference = 0x77,
DW_AT_rvalue_reference = 0x78,
DW_AT_macros = 0x79,
DW_AT_call_all_calls = 0x7a,
DW_AT_call_all_source_calls = 0x7b,
DW_AT_call_all_tail_calls = 0x7c,
DW_AT_call_return_pc = 0x7d,
DW_AT_call_value = 0x7e,
DW_AT_call_origin = 0x7f,
DW_AT_call_parameter = 0x80,
DW_AT_call_pc = 0x81,
DW_AT_call_tail_call = 0x82,
DW_AT_call_target = 0x83,
DW_AT_call_target_clobbered = 0x84,
DW_AT_call_data_location = 0x85,
DW_AT_call_data_value = 0x86,
DW_AT_noreturn = 0x87,
DW_AT_alignment = 0x88,
DW_AT_export_symbols = 0x89,
DW_AT_deleted = 0x8a,
DW_AT_defaulted = 0x8b,
DW_AT_loclists_base = 0x8c,
#define HANDLE_DW_AT(ID, NAME) DW_AT_##NAME = ID,
#include "llvm/Support/Dwarf.def"
DW_AT_lo_user = 0x2000,
DW_AT_hi_user = 0x3fff,
DW_AT_MIPS_loop_begin = 0x2002,
DW_AT_MIPS_tail_loop_begin = 0x2003,
DW_AT_MIPS_epilog_begin = 0x2004,
DW_AT_MIPS_loop_unroll_factor = 0x2005,
DW_AT_MIPS_software_pipeline_depth = 0x2006,
DW_AT_MIPS_linkage_name = 0x2007,
DW_AT_MIPS_stride = 0x2008,
DW_AT_MIPS_abstract_name = 0x2009,
DW_AT_MIPS_clone_origin = 0x200a,
DW_AT_MIPS_has_inlines = 0x200b,
DW_AT_MIPS_stride_byte = 0x200c,
DW_AT_MIPS_stride_elem = 0x200d,
DW_AT_MIPS_ptr_dopetype = 0x200e,
DW_AT_MIPS_allocatable_dopetype = 0x200f,
DW_AT_MIPS_assumed_shape_dopetype = 0x2010,
// This one appears to have only been implemented by Open64 for
// fortran and may conflict with other extensions.
DW_AT_MIPS_assumed_size = 0x2011,
// GNU extensions
DW_AT_sf_names = 0x2101,
DW_AT_src_info = 0x2102,
DW_AT_mac_info = 0x2103,
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
DW_AT_body_end = 0x2106,
DW_AT_GNU_vector = 0x2107,
DW_AT_GNU_template_name = 0x2110,
DW_AT_GNU_odr_signature = 0x210f,
DW_AT_GNU_macros = 0x2119,
// Extensions for Fission proposal.
DW_AT_GNU_dwo_name = 0x2130,
DW_AT_GNU_dwo_id = 0x2131,
DW_AT_GNU_ranges_base = 0x2132,
DW_AT_GNU_addr_base = 0x2133,
DW_AT_GNU_pubnames = 0x2134,
DW_AT_GNU_pubtypes = 0x2135,
DW_AT_GNU_discriminator = 0x2136,
// Borland extensions.
DW_AT_BORLAND_property_read = 0x3b11,
DW_AT_BORLAND_property_write = 0x3b12,
DW_AT_BORLAND_property_implements = 0x3b13,
DW_AT_BORLAND_property_index = 0x3b14,
DW_AT_BORLAND_property_default = 0x3b15,
DW_AT_BORLAND_Delphi_unit = 0x3b20,
DW_AT_BORLAND_Delphi_class = 0x3b21,
DW_AT_BORLAND_Delphi_record = 0x3b22,
DW_AT_BORLAND_Delphi_metaclass = 0x3b23,
DW_AT_BORLAND_Delphi_constructor = 0x3b24,
DW_AT_BORLAND_Delphi_destructor = 0x3b25,
DW_AT_BORLAND_Delphi_anonymous_method = 0x3b26,
DW_AT_BORLAND_Delphi_interface = 0x3b27,
DW_AT_BORLAND_Delphi_ABI = 0x3b28,
DW_AT_BORLAND_Delphi_return = 0x3b29,
DW_AT_BORLAND_Delphi_frameptr = 0x3b30,
DW_AT_BORLAND_closure = 0x3b31,
// LLVM project extensions.
DW_AT_LLVM_include_path = 0x3e00,
DW_AT_LLVM_config_macros = 0x3e01,
DW_AT_LLVM_isysroot = 0x3e02,
// Apple extensions.
DW_AT_APPLE_optimized = 0x3fe1,
DW_AT_APPLE_flags = 0x3fe2,
DW_AT_APPLE_isa = 0x3fe3,
DW_AT_APPLE_block = 0x3fe4,
DW_AT_APPLE_major_runtime_vers = 0x3fe5,
DW_AT_APPLE_runtime_class = 0x3fe6,
DW_AT_APPLE_omit_frame_ptr = 0x3fe7,
DW_AT_APPLE_property_name = 0x3fe8,
DW_AT_APPLE_property_getter = 0x3fe9,
DW_AT_APPLE_property_setter = 0x3fea,
DW_AT_APPLE_property_attribute = 0x3feb,
DW_AT_APPLE_objc_complete_type = 0x3fec,
DW_AT_APPLE_property = 0x3fed
};
enum Form : uint16_t {

View File

@ -46,202 +46,13 @@ StringRef llvm::dwarf::ChildrenString(unsigned Children) {
StringRef llvm::dwarf::AttributeString(unsigned Attribute) {
switch (Attribute) {
case DW_AT_sibling: return "DW_AT_sibling";
case DW_AT_location: return "DW_AT_location";
case DW_AT_name: return "DW_AT_name";
case DW_AT_ordering: return "DW_AT_ordering";
case DW_AT_byte_size: return "DW_AT_byte_size";
case DW_AT_bit_offset: return "DW_AT_bit_offset";
case DW_AT_bit_size: return "DW_AT_bit_size";
case DW_AT_stmt_list: return "DW_AT_stmt_list";
case DW_AT_low_pc: return "DW_AT_low_pc";
case DW_AT_high_pc: return "DW_AT_high_pc";
case DW_AT_language: return "DW_AT_language";
case DW_AT_discr: return "DW_AT_discr";
case DW_AT_discr_value: return "DW_AT_discr_value";
case DW_AT_visibility: return "DW_AT_visibility";
case DW_AT_import: return "DW_AT_import";
case DW_AT_string_length: return "DW_AT_string_length";
case DW_AT_common_reference: return "DW_AT_common_reference";
case DW_AT_comp_dir: return "DW_AT_comp_dir";
case DW_AT_const_value: return "DW_AT_const_value";
case DW_AT_containing_type: return "DW_AT_containing_type";
case DW_AT_default_value: return "DW_AT_default_value";
case DW_AT_inline: return "DW_AT_inline";
case DW_AT_is_optional: return "DW_AT_is_optional";
case DW_AT_lower_bound: return "DW_AT_lower_bound";
case DW_AT_producer: return "DW_AT_producer";
case DW_AT_prototyped: return "DW_AT_prototyped";
case DW_AT_return_addr: return "DW_AT_return_addr";
case DW_AT_start_scope: return "DW_AT_start_scope";
case DW_AT_bit_stride: return "DW_AT_bit_stride";
case DW_AT_upper_bound: return "DW_AT_upper_bound";
case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
case DW_AT_accessibility: return "DW_AT_accessibility";
case DW_AT_address_class: return "DW_AT_address_class";
case DW_AT_artificial: return "DW_AT_artificial";
case DW_AT_base_types: return "DW_AT_base_types";
case DW_AT_calling_convention: return "DW_AT_calling_convention";
case DW_AT_count: return "DW_AT_count";
case DW_AT_data_member_location: return "DW_AT_data_member_location";
case DW_AT_decl_column: return "DW_AT_decl_column";
case DW_AT_decl_file: return "DW_AT_decl_file";
case DW_AT_decl_line: return "DW_AT_decl_line";
case DW_AT_declaration: return "DW_AT_declaration";
case DW_AT_discr_list: return "DW_AT_discr_list";
case DW_AT_encoding: return "DW_AT_encoding";
case DW_AT_external: return "DW_AT_external";
case DW_AT_frame_base: return "DW_AT_frame_base";
case DW_AT_friend: return "DW_AT_friend";
case DW_AT_identifier_case: return "DW_AT_identifier_case";
case DW_AT_macro_info: return "DW_AT_macro_info";
case DW_AT_namelist_item: return "DW_AT_namelist_item";
case DW_AT_priority: return "DW_AT_priority";
case DW_AT_segment: return "DW_AT_segment";
case DW_AT_specification: return "DW_AT_specification";
case DW_AT_static_link: return "DW_AT_static_link";
case DW_AT_type: return "DW_AT_type";
case DW_AT_use_location: return "DW_AT_use_location";
case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
case DW_AT_virtuality: return "DW_AT_virtuality";
case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
case DW_AT_allocated: return "DW_AT_allocated";
case DW_AT_associated: return "DW_AT_associated";
case DW_AT_data_location: return "DW_AT_data_location";
case DW_AT_byte_stride: return "DW_AT_byte_stride";
case DW_AT_entry_pc: return "DW_AT_entry_pc";
case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
case DW_AT_extension: return "DW_AT_extension";
case DW_AT_ranges: return "DW_AT_ranges";
case DW_AT_trampoline: return "DW_AT_trampoline";
case DW_AT_call_column: return "DW_AT_call_column";
case DW_AT_call_file: return "DW_AT_call_file";
case DW_AT_call_line: return "DW_AT_call_line";
case DW_AT_description: return "DW_AT_description";
case DW_AT_binary_scale: return "DW_AT_binary_scale";
case DW_AT_decimal_scale: return "DW_AT_decimal_scale";
case DW_AT_small: return "DW_AT_small";
case DW_AT_decimal_sign: return "DW_AT_decimal_sign";
case DW_AT_digit_count: return "DW_AT_digit_count";
case DW_AT_picture_string: return "DW_AT_picture_string";
case DW_AT_mutable: return "DW_AT_mutable";
case DW_AT_threads_scaled: return "DW_AT_threads_scaled";
case DW_AT_explicit: return "DW_AT_explicit";
case DW_AT_object_pointer: return "DW_AT_object_pointer";
case DW_AT_endianity: return "DW_AT_endianity";
case DW_AT_elemental: return "DW_AT_elemental";
case DW_AT_pure: return "DW_AT_pure";
case DW_AT_recursive: return "DW_AT_recursive";
case DW_AT_signature: return "DW_AT_signature";
case DW_AT_main_subprogram: return "DW_AT_main_subprogram";
case DW_AT_data_bit_offset: return "DW_AT_data_bit_offset";
case DW_AT_const_expr: return "DW_AT_const_expr";
case DW_AT_enum_class: return "DW_AT_enum_class";
case DW_AT_linkage_name: return "DW_AT_linkage_name";
case DW_AT_string_length_bit_size: return "DW_AT_string_length_bit_size";
case DW_AT_string_length_byte_size: return "DW_AT_string_length_byte_size";
case DW_AT_rank: return "DW_AT_rank";
case DW_AT_str_offsets_base: return "DW_AT_str_offsets_base";
case DW_AT_addr_base: return "DW_AT_addr_base";
case DW_AT_rnglists_base: return "DW_AT_rnglists_base";
case DW_AT_dwo_id: return "DW_AT_dwo_id";
case DW_AT_dwo_name: return "DW_AT_dwo_name";
case DW_AT_reference: return "DW_AT_reference";
case DW_AT_rvalue_reference: return "DW_AT_rvalue_reference";
case DW_AT_macros: return "DW_AT_macros";
case DW_AT_call_all_calls: return "DW_AT_call_all_calls";
case DW_AT_call_all_source_calls: return "DW_AT_call_all_source_calls";
case DW_AT_call_all_tail_calls: return "DW_AT_call_all_tail_calls";
case DW_AT_call_return_pc: return "DW_AT_call_return_pc";
case DW_AT_call_value: return "DW_AT_call_value";
case DW_AT_call_origin: return "DW_AT_call_origin";
case DW_AT_call_parameter: return "DW_AT_call_parameter";
case DW_AT_call_pc: return "DW_AT_call_pc";
case DW_AT_call_tail_call: return "DW_AT_call_tail_call";
case DW_AT_call_target: return "DW_AT_call_target";
case DW_AT_call_target_clobbered: return "DW_AT_call_target_clobbered";
case DW_AT_call_data_location: return "DW_AT_call_data_location";
case DW_AT_call_data_value: return "DW_AT_call_data_value";
case DW_AT_noreturn: return "DW_AT_noreturn";
case DW_AT_alignment: return "DW_AT_alignment";
case DW_AT_export_symbols: return "DW_AT_export_symbols";
case DW_AT_deleted: return "DW_AT_deleted";
case DW_AT_defaulted: return "DW_AT_defaulted";
case DW_AT_loclists_base: return "DW_AT_loclists_base";
case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
case DW_AT_MIPS_loop_unroll_factor: return "DW_AT_MIPS_loop_unroll_factor";
case DW_AT_MIPS_software_pipeline_depth:
return "DW_AT_MIPS_software_pipeline_depth";
case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
case DW_AT_MIPS_stride_byte: return "DW_AT_MIPS_stride_byte";
case DW_AT_MIPS_stride_elem: return "DW_AT_MIPS_stride_elem";
case DW_AT_MIPS_ptr_dopetype: return "DW_AT_MIPS_ptr_dopetype";
case DW_AT_MIPS_allocatable_dopetype:
return "DW_AT_MIPS_allocatable_dopetype";
case DW_AT_MIPS_assumed_shape_dopetype:
return "DW_AT_MIPS_assumed_shape_dopetype";
case DW_AT_sf_names: return "DW_AT_sf_names";
case DW_AT_src_info: return "DW_AT_src_info";
case DW_AT_mac_info: return "DW_AT_mac_info";
case DW_AT_src_coords: return "DW_AT_src_coords";
case DW_AT_body_begin: return "DW_AT_body_begin";
case DW_AT_body_end: return "DW_AT_body_end";
case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
case DW_AT_GNU_template_name: return "DW_AT_GNU_template_name";
case DW_AT_GNU_odr_signature: return "DW_AT_GNU_odr_signature";
case DW_AT_MIPS_assumed_size: return "DW_AT_MIPS_assumed_size";
case DW_AT_lo_user: return "DW_AT_lo_user";
case DW_AT_hi_user: return "DW_AT_hi_user";
case DW_AT_BORLAND_property_read: return "DW_AT_BORLAND_property_read";
case DW_AT_BORLAND_property_write: return "DW_AT_BORLAND_property_write";
case DW_AT_BORLAND_property_implements: return "DW_AT_BORLAND_property_implements";
case DW_AT_BORLAND_property_index: return "DW_AT_BORLAND_property_index";
case DW_AT_BORLAND_property_default: return "DW_AT_BORLAND_property_default";
case DW_AT_BORLAND_Delphi_unit: return "DW_AT_BORLAND_Delphi_unit";
case DW_AT_BORLAND_Delphi_class: return "DW_AT_BORLAND_Delphi_class";
case DW_AT_BORLAND_Delphi_record: return "DW_AT_BORLAND_Delphi_record";
case DW_AT_BORLAND_Delphi_metaclass: return "DW_AT_BORLAND_Delphi_metaclass";
case DW_AT_BORLAND_Delphi_constructor: return "DW_AT_BORLAND_Delphi_constructor";
case DW_AT_BORLAND_Delphi_destructor: return "DW_AT_BORLAND_Delphi_destructor";
case DW_AT_BORLAND_Delphi_anonymous_method: return "DW_AT_BORLAND_Delphi_anonymous_method";
case DW_AT_BORLAND_Delphi_interface: return "DW_AT_BORLAND_Delphi_interface";
case DW_AT_BORLAND_Delphi_ABI: return "DW_AT_BORLAND_Delphi_ABI";
case DW_AT_BORLAND_Delphi_return: return "DW_AT_BORLAND_Delphi_return";
case DW_AT_BORLAND_Delphi_frameptr: return "DW_AT_BORLAND_Delphi_frameptr";
case DW_AT_BORLAND_closure: return "DW_AT_BORLAND_closure";
case DW_AT_APPLE_optimized: return "DW_AT_APPLE_optimized";
case DW_AT_APPLE_flags: return "DW_AT_APPLE_flags";
case DW_AT_APPLE_isa: return "DW_AT_APPLE_isa";
case DW_AT_APPLE_block: return "DW_AT_APPLE_block";
case DW_AT_APPLE_major_runtime_vers: return "DW_AT_APPLE_major_runtime_vers";
case DW_AT_APPLE_runtime_class: return "DW_AT_APPLE_runtime_class";
case DW_AT_APPLE_omit_frame_ptr: return "DW_AT_APPLE_omit_frame_ptr";
case DW_AT_APPLE_property_name: return "DW_AT_APPLE_property_name";
case DW_AT_APPLE_property_getter: return "DW_AT_APPLE_property_getter";
case DW_AT_APPLE_property_setter: return "DW_AT_APPLE_property_setter";
case DW_AT_APPLE_property_attribute: return "DW_AT_APPLE_property_attribute";
case DW_AT_APPLE_property: return "DW_AT_APPLE_property";
case DW_AT_APPLE_objc_complete_type: return "DW_AT_APPLE_objc_complete_type";
case DW_AT_LLVM_include_path: return "DW_AT_LLVM_include_path";
case DW_AT_LLVM_config_macros: return "DW_AT_LLVM_config_macros";
case DW_AT_LLVM_isysroot: return "DW_AT_LLVM_isysroot";
// DWARF5 Fission Extension Attribute
case DW_AT_GNU_dwo_name: return "DW_AT_GNU_dwo_name";
case DW_AT_GNU_dwo_id: return "DW_AT_GNU_dwo_id";
case DW_AT_GNU_ranges_base: return "DW_AT_GNU_ranges_base";
case DW_AT_GNU_addr_base: return "DW_AT_GNU_addr_base";
case DW_AT_GNU_pubnames: return "DW_AT_GNU_pubnames";
case DW_AT_GNU_pubtypes: return "DW_AT_GNU_pubtypes";
case DW_AT_GNU_discriminator: return "DW_AT_GNU_discriminator";
default:
return StringRef();
#define HANDLE_DW_AT(ID, NAME) \
case DW_AT_##NAME: \
return "DW_AT_" #NAME;
#include "llvm/Support/Dwarf.def"
}
return StringRef();
}
StringRef llvm::dwarf::FormEncodingString(unsigned Encoding) {