diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-10-28 22:56:45 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-10-28 22:56:45 +0000 |
commit | 23865816d56043bf5ef8ce09ee4a48970062064a (patch) | |
tree | 167d2f5abdc3e6381d3b10cf87ace17a14a48364 /llvm/lib/Support | |
parent | d03a5ffcf666ed2473ea7cd0901823b43fe5dbfe (diff) | |
download | bcm5719-llvm-23865816d56043bf5ef8ce09ee4a48970062064a.tar.gz bcm5719-llvm-23865816d56043bf5ef8ce09ee4a48970062064a.zip |
Refactor all DW_FORM_* constants into Dwarf.def
llvm-svn: 285470
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Dwarf.cpp | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp index cd8368152fb..bc9210797e5 100644 --- a/llvm/lib/Support/Dwarf.cpp +++ b/llvm/lib/Support/Dwarf.cpp @@ -57,41 +57,13 @@ StringRef llvm::dwarf::AttributeString(unsigned Attribute) { StringRef llvm::dwarf::FormEncodingString(unsigned Encoding) { switch (Encoding) { - case DW_FORM_addr: return "DW_FORM_addr"; - case DW_FORM_block2: return "DW_FORM_block2"; - case DW_FORM_block4: return "DW_FORM_block4"; - case DW_FORM_data2: return "DW_FORM_data2"; - case DW_FORM_data4: return "DW_FORM_data4"; - case DW_FORM_data8: return "DW_FORM_data8"; - case DW_FORM_string: return "DW_FORM_string"; - case DW_FORM_block: return "DW_FORM_block"; - case DW_FORM_block1: return "DW_FORM_block1"; - case DW_FORM_data1: return "DW_FORM_data1"; - case DW_FORM_flag: return "DW_FORM_flag"; - case DW_FORM_sdata: return "DW_FORM_sdata"; - case DW_FORM_strp: return "DW_FORM_strp"; - case DW_FORM_udata: return "DW_FORM_udata"; - case DW_FORM_ref_addr: return "DW_FORM_ref_addr"; - case DW_FORM_ref1: return "DW_FORM_ref1"; - case DW_FORM_ref2: return "DW_FORM_ref2"; - case DW_FORM_ref4: return "DW_FORM_ref4"; - case DW_FORM_ref8: return "DW_FORM_ref8"; - case DW_FORM_ref_udata: return "DW_FORM_ref_udata"; - case DW_FORM_indirect: return "DW_FORM_indirect"; - case DW_FORM_sec_offset: return "DW_FORM_sec_offset"; - case DW_FORM_exprloc: return "DW_FORM_exprloc"; - case DW_FORM_flag_present: return "DW_FORM_flag_present"; - case DW_FORM_ref_sig8: return "DW_FORM_ref_sig8"; - - // DWARF5 Fission Extension Forms - case DW_FORM_GNU_addr_index: return "DW_FORM_GNU_addr_index"; - case DW_FORM_GNU_str_index: return "DW_FORM_GNU_str_index"; - - // Alternate debug sections proposal (output of "dwz" tool). - case DW_FORM_GNU_ref_alt: return "DW_FORM_GNU_ref_alt"; - case DW_FORM_GNU_strp_alt: return "DW_FORM_GNU_strp_alt"; + default: + return StringRef(); +#define HANDLE_DW_FORM(ID, NAME) \ + case DW_FORM_##NAME: \ + return "DW_FORM_" #NAME; +#include "llvm/Support/Dwarf.def" } - return StringRef(); } StringRef llvm::dwarf::OperationEncodingString(unsigned Encoding) { |