Skip to content

Commit

Permalink
[DWARFYAML] Merge forms that use same encodings. NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
higuoxing committed Jul 17, 2020
1 parent 5d31d09 commit dc65f57
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions llvm/lib/ObjectYAML/DWARFVisitor.cpp
Expand Up @@ -118,6 +118,10 @@ template <typename T> Error DWARFYAML::VisitorImpl<T>::traverseDebugInfo() {
case dwarf::DW_FORM_addrx:
case dwarf::DW_FORM_rnglistx:
case dwarf::DW_FORM_loclistx:
case dwarf::DW_FORM_udata:
case dwarf::DW_FORM_ref_udata:
case dwarf::DW_FORM_GNU_addr_index:
case dwarf::DW_FORM_GNU_str_index:
onValue((uint64_t)FormVal->Value, /*LEB=*/true);
break;
case dwarf::DW_FORM_data1:
Expand All @@ -143,15 +147,12 @@ template <typename T> Error DWARFYAML::VisitorImpl<T>::traverseDebugInfo() {
case dwarf::DW_FORM_data8:
case dwarf::DW_FORM_ref8:
case dwarf::DW_FORM_ref_sup8:
case dwarf::DW_FORM_ref_sig8:
onValue((uint64_t)FormVal->Value);
break;
case dwarf::DW_FORM_sdata:
onValue((int64_t)FormVal->Value, true);
break;
case dwarf::DW_FORM_udata:
case dwarf::DW_FORM_ref_udata:
onValue((uint64_t)FormVal->Value, true);
break;
case dwarf::DW_FORM_string:
onValue(FormVal->CStr);
break;
Expand All @@ -169,13 +170,6 @@ template <typename T> Error DWARFYAML::VisitorImpl<T>::traverseDebugInfo() {
case dwarf::DW_FORM_strp_sup:
onVariableSizeValue(FormVal->Value, getOffsetSize(Unit));
break;
case dwarf::DW_FORM_ref_sig8:
onValue((uint64_t)FormVal->Value);
break;
case dwarf::DW_FORM_GNU_addr_index:
case dwarf::DW_FORM_GNU_str_index:
onValue((uint64_t)FormVal->Value, true);
break;
default:
break;
}
Expand Down

0 comments on commit dc65f57

Please sign in to comment.