Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/ObjectYAML/DWARFYAML.cpp
Show All 26 Lines | SetVector<StringRef> DWARFYAML::Data::getNonEmptySectionNames() const { | ||||
if (DebugAranges) | if (DebugAranges) | ||||
SecNames.insert("debug_aranges"); | SecNames.insert("debug_aranges"); | ||||
if (!DebugRanges.empty()) | if (!DebugRanges.empty()) | ||||
SecNames.insert("debug_ranges"); | SecNames.insert("debug_ranges"); | ||||
if (!DebugLines.empty()) | if (!DebugLines.empty()) | ||||
SecNames.insert("debug_line"); | SecNames.insert("debug_line"); | ||||
if (!DebugAddr.empty()) | if (!DebugAddr.empty()) | ||||
SecNames.insert("debug_addr"); | SecNames.insert("debug_addr"); | ||||
if (!AbbrevDecls.empty()) | if (!DebugAbbrev.empty()) | ||||
SecNames.insert("debug_abbrev"); | SecNames.insert("debug_abbrev"); | ||||
if (!CompileUnits.empty()) | if (!CompileUnits.empty()) | ||||
SecNames.insert("debug_info"); | SecNames.insert("debug_info"); | ||||
if (PubNames) | if (PubNames) | ||||
SecNames.insert("debug_pubnames"); | SecNames.insert("debug_pubnames"); | ||||
if (PubTypes) | if (PubTypes) | ||||
SecNames.insert("debug_pubtypes"); | SecNames.insert("debug_pubtypes"); | ||||
if (GNUPubNames) | if (GNUPubNames) | ||||
Show All 11 Lines | |||||
namespace yaml { | namespace yaml { | ||||
void MappingTraits<DWARFYAML::Data>::mapping(IO &IO, DWARFYAML::Data &DWARF) { | void MappingTraits<DWARFYAML::Data>::mapping(IO &IO, DWARFYAML::Data &DWARF) { | ||||
void *OldContext = IO.getContext(); | void *OldContext = IO.getContext(); | ||||
DWARFYAML::DWARFContext DWARFCtx; | DWARFYAML::DWARFContext DWARFCtx; | ||||
IO.setContext(&DWARFCtx); | IO.setContext(&DWARFCtx); | ||||
IO.mapOptional("debug_str", DWARF.DebugStrings); | IO.mapOptional("debug_str", DWARF.DebugStrings); | ||||
IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls); | IO.mapOptional("debug_abbrev", DWARF.DebugAbbrev); | ||||
IO.mapOptional("debug_aranges", DWARF.DebugAranges); | IO.mapOptional("debug_aranges", DWARF.DebugAranges); | ||||
if (!DWARF.DebugRanges.empty() || !IO.outputting()) | if (!DWARF.DebugRanges.empty() || !IO.outputting()) | ||||
IO.mapOptional("debug_ranges", DWARF.DebugRanges); | IO.mapOptional("debug_ranges", DWARF.DebugRanges); | ||||
IO.mapOptional("debug_pubnames", DWARF.PubNames); | IO.mapOptional("debug_pubnames", DWARF.PubNames); | ||||
IO.mapOptional("debug_pubtypes", DWARF.PubTypes); | IO.mapOptional("debug_pubtypes", DWARF.PubTypes); | ||||
DWARFCtx.IsGNUPubSec = true; | DWARFCtx.IsGNUPubSec = true; | ||||
IO.mapOptional("debug_gnu_pubnames", DWARF.GNUPubNames); | IO.mapOptional("debug_gnu_pubnames", DWARF.GNUPubNames); | ||||
IO.mapOptional("debug_gnu_pubtypes", DWARF.GNUPubTypes); | IO.mapOptional("debug_gnu_pubtypes", DWARF.GNUPubTypes); | ||||
IO.mapOptional("debug_info", DWARF.CompileUnits); | IO.mapOptional("debug_info", DWARF.CompileUnits); | ||||
IO.mapOptional("debug_line", DWARF.DebugLines); | IO.mapOptional("debug_line", DWARF.DebugLines); | ||||
IO.mapOptional("debug_addr", DWARF.DebugAddr); | IO.mapOptional("debug_addr", DWARF.DebugAddr); | ||||
IO.mapOptional("debug_str_offsets", DWARF.DebugStrOffsets); | IO.mapOptional("debug_str_offsets", DWARF.DebugStrOffsets); | ||||
IO.mapOptional("debug_rnglists", DWARF.DebugRnglists); | IO.mapOptional("debug_rnglists", DWARF.DebugRnglists); | ||||
IO.mapOptional("debug_loclists", DWARF.DebugLoclists); | IO.mapOptional("debug_loclists", DWARF.DebugLoclists); | ||||
IO.setContext(OldContext); | IO.setContext(OldContext); | ||||
} | } | ||||
void MappingTraits<DWARFYAML::AbbrevTable>::mapping( | |||||
IO &IO, DWARFYAML::AbbrevTable &AbbrevTable) { | |||||
IO.mapOptional("Table", AbbrevTable.Table); | |||||
} | |||||
void MappingTraits<DWARFYAML::Abbrev>::mapping(IO &IO, | void MappingTraits<DWARFYAML::Abbrev>::mapping(IO &IO, | ||||
DWARFYAML::Abbrev &Abbrev) { | DWARFYAML::Abbrev &Abbrev) { | ||||
IO.mapOptional("Code", Abbrev.Code); | IO.mapOptional("Code", Abbrev.Code); | ||||
IO.mapRequired("Tag", Abbrev.Tag); | IO.mapRequired("Tag", Abbrev.Tag); | ||||
IO.mapRequired("Children", Abbrev.Children); | IO.mapRequired("Children", Abbrev.Children); | ||||
IO.mapRequired("Attributes", Abbrev.Attributes); | IO.mapRequired("Attributes", Abbrev.Attributes); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |