blob: a5f0255e3384213fe63f2a5f6a776b79bac89698 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//===- DWARFYAML.cpp - DWARF YAMLIO implementation ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines classes for handling the YAML representation of DWARF Debug
// Info.
//
//===----------------------------------------------------------------------===//
#include "llvm/ObjectYAML/DWARFYAML.h"
namespace llvm {
bool DWARFYAML::DWARFData::isEmpty() const {
return 0 == DebugStrings.size() + AbbrevDecls.size();
}
namespace yaml {
void MappingTraits<DWARFYAML::DWARFData>::mapping(
IO &IO, DWARFYAML::DWARFData &DWARF) {
IO.mapOptional("debug_str", DWARF.DebugStrings);
IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls);
}
void MappingTraits<DWARFYAML::DWARFAbbrev>::mapping(
IO &IO, DWARFYAML::DWARFAbbrev &Abbrev) {
IO.mapRequired("Code", Abbrev.Code);
IO.mapRequired("Tag", Abbrev.Tag);
IO.mapRequired("Children", Abbrev.Children);
IO.mapRequired("Attributes", Abbrev.Attributes);
}
void MappingTraits<DWARFYAML::DWARFAttributeAbbrev>::mapping(
IO &IO, DWARFYAML::DWARFAttributeAbbrev &AttAbbrev) {
IO.mapRequired("Attribute", AttAbbrev.Attribute);
IO.mapRequired("Form", AttAbbrev.Form);
}
} // namespace llvm::yaml
} // namespace llvm
|