15 #ifndef LLVM_OBJECTYAML_DWARFYAML_H
16 #define LLVM_OBJECTYAML_DWARFYAML_H
24 #include <unordered_map>
207 std::vector<ListEntries<EntryType>>
Lists;
243 mutable std::unordered_map<uint64_t, AbbrevTableInfo> AbbrevTableInfoMap;
244 mutable std::unordered_map<uint64_t, std::string> AbbrevTableContents;
282 template <>
struct MappingTraits<DWARFYAML::
Data> {
283 static void mapping(IO &IO, DWARFYAML::Data &DWARF);
286 template <>
struct MappingTraits<DWARFYAML::AbbrevTable> {
287 static void mapping(IO &IO, DWARFYAML::AbbrevTable &AbbrevTable);
290 template <>
struct MappingTraits<DWARFYAML::Abbrev> {
291 static void mapping(IO &IO, DWARFYAML::Abbrev &Abbrev);
294 template <>
struct MappingTraits<DWARFYAML::AttributeAbbrev> {
295 static void mapping(IO &IO, DWARFYAML::AttributeAbbrev &AttAbbrev);
298 template <>
struct MappingTraits<DWARFYAML::ARangeDescriptor> {
299 static void mapping(IO &IO, DWARFYAML::ARangeDescriptor &Descriptor);
302 template <>
struct MappingTraits<DWARFYAML::ARange> {
303 static void mapping(IO &IO, DWARFYAML::ARange &ARange);
306 template <>
struct MappingTraits<DWARFYAML::RangeEntry> {
307 static void mapping(IO &IO, DWARFYAML::RangeEntry &Entry);
310 template <>
struct MappingTraits<DWARFYAML::Ranges> {
311 static void mapping(IO &IO, DWARFYAML::Ranges &Ranges);
314 template <>
struct MappingTraits<DWARFYAML::PubEntry> {
315 static void mapping(IO &IO, DWARFYAML::PubEntry &Entry);
318 template <>
struct MappingTraits<DWARFYAML::PubSection> {
319 static void mapping(IO &IO, DWARFYAML::PubSection &Section);
322 template <>
struct MappingTraits<DWARFYAML::Unit> {
323 static void mapping(IO &IO, DWARFYAML::Unit &Unit);
326 template <>
struct MappingTraits<DWARFYAML::Entry> {
327 static void mapping(IO &IO, DWARFYAML::Entry &Entry);
330 template <>
struct MappingTraits<DWARFYAML::FormValue> {
331 static void mapping(IO &IO, DWARFYAML::FormValue &FormValue);
334 template <>
struct MappingTraits<DWARFYAML::
File> {
335 static void mapping(IO &IO, DWARFYAML::File &File);
338 template <>
struct MappingTraits<DWARFYAML::LineTableOpcode> {
339 static void mapping(IO &IO, DWARFYAML::LineTableOpcode &LineTableOpcode);
342 template <>
struct MappingTraits<DWARFYAML::LineTable> {
343 static void mapping(IO &IO, DWARFYAML::LineTable &LineTable);
346 template <>
struct MappingTraits<DWARFYAML::SegAddrPair> {
347 static void mapping(IO &IO, DWARFYAML::SegAddrPair &SegAddrPair);
350 template <>
struct MappingTraits<DWARFYAML::DWARFOperation> {
351 static void mapping(IO &IO, DWARFYAML::DWARFOperation &DWARFOperation);
354 template <
typename EntryType>
355 struct MappingTraits<DWARFYAML::ListTable<EntryType>> {
356 static void mapping(IO &IO, DWARFYAML::ListTable<EntryType> &ListTable);
359 template <
typename EntryType>
360 struct MappingTraits<DWARFYAML::ListEntries<EntryType>> {
361 static void mapping(IO &IO, DWARFYAML::ListEntries<EntryType> &ListEntries);
363 DWARFYAML::ListEntries<EntryType> &ListEntries);
366 template <>
struct MappingTraits<DWARFYAML::RnglistEntry> {
367 static void mapping(IO &IO, DWARFYAML::RnglistEntry &RnglistEntry);
370 template <>
struct MappingTraits<DWARFYAML::LoclistEntry> {
371 static void mapping(IO &IO, DWARFYAML::LoclistEntry &LoclistEntry);
374 template <>
struct MappingTraits<DWARFYAML::AddrTableEntry> {
375 static void mapping(IO &IO, DWARFYAML::AddrTableEntry &AddrTable);
378 template <>
struct MappingTraits<DWARFYAML::StringOffsetsTable> {
379 static void mapping(IO &IO, DWARFYAML::StringOffsetsTable &StrOffsetsTable);
382 template <>
struct ScalarEnumerationTraits<dwarf::
DwarfFormat> {
389 #define HANDLE_DW_TAG(unused, name, unused2, unused3, unused4) \
390 io.enumCase(value, "DW_TAG_" #name, dwarf::DW_TAG_##name);
392 template <>
struct ScalarEnumerationTraits<dwarf::
Tag> {
393 static void enumeration(IO &io,
dwarf::Tag &value) {
394 #include "llvm/BinaryFormat/Dwarf.def"
395 io.enumFallback<Hex16>(value);
399 #define HANDLE_DW_LNS(unused, name) \
400 io.enumCase(value, "DW_LNS_" #name, dwarf::DW_LNS_##name);
402 template <>
struct ScalarEnumerationTraits<dwarf::
LineNumberOps> {
404 #include "llvm/BinaryFormat/Dwarf.def"
405 io.enumFallback<Hex8>(value);
409 #define HANDLE_DW_LNE(unused, name) \
410 io.enumCase(value, "DW_LNE_" #name, dwarf::DW_LNE_##name);
414 #include "llvm/BinaryFormat/Dwarf.def"
415 io.enumFallback<Hex16>(value);
419 #define HANDLE_DW_AT(unused, name, unused2, unused3) \
420 io.enumCase(value, "DW_AT_" #name, dwarf::DW_AT_##name);
422 template <>
struct ScalarEnumerationTraits<dwarf::
Attribute> {
424 #include "llvm/BinaryFormat/Dwarf.def"
425 io.enumFallback<Hex16>(value);
429 #define HANDLE_DW_FORM(unused, name, unused2, unused3) \
430 io.enumCase(value, "DW_FORM_" #name, dwarf::DW_FORM_##name);
432 template <>
struct ScalarEnumerationTraits<dwarf::
Form> {
433 static void enumeration(IO &io,
dwarf::Form &value) {
434 #include "llvm/BinaryFormat/Dwarf.def"
435 io.enumFallback<Hex16>(value);
439 #define HANDLE_DW_UT(unused, name) \
440 io.enumCase(value, "DW_UT_" #name, dwarf::DW_UT_##name);
442 template <>
struct ScalarEnumerationTraits<dwarf::
UnitType> {
444 #include "llvm/BinaryFormat/Dwarf.def"
445 io.enumFallback<Hex8>(value);
449 template <>
struct ScalarEnumerationTraits<dwarf::
Constants> {
453 io.enumFallback<Hex16>(value);
457 #define HANDLE_DW_RLE(unused, name) \
458 io.enumCase(value, "DW_RLE_" #name, dwarf::DW_RLE_##name);
460 template <>
struct ScalarEnumerationTraits<dwarf::
RnglistEntries> {
462 #include "llvm/BinaryFormat/Dwarf.def"
466 #define HANDLE_DW_LLE(unused, name) \
467 io.enumCase(value, "DW_LLE_" #name, dwarf::DW_LLE_##name);
469 template <>
struct ScalarEnumerationTraits<dwarf::
LoclistEntries> {
471 #include "llvm/BinaryFormat/Dwarf.def"
475 #define HANDLE_DW_OP(id, name, version, vendor) \
476 io.enumCase(value, "DW_OP_" #name, dwarf::DW_OP_##name);
478 template <>
struct ScalarEnumerationTraits<dwarf::
LocationAtom> {
480 #include "llvm/BinaryFormat/Dwarf.def"
481 io.enumFallback<yaml::Hex8>(value);
488 #endif // LLVM_OBJECTYAML_DWARFYAML_H