summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML/MachOYAML.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-12-07 21:26:32 +0000
committerChris Bieneman <beanz@apple.com>2016-12-07 21:26:32 +0000
commit79e60eb94880f5beac5c69fb2e42393fec6c279b (patch)
treeafe760a9a3b99db858b9b27453896ae45c4381c4 /llvm/lib/ObjectYAML/MachOYAML.cpp
parent50db7f416c5442a4b033628b7ef73377f621f7ec (diff)
downloadbcm5719-llvm-79e60eb94880f5beac5c69fb2e42393fec6c279b.tar.gz
bcm5719-llvm-79e60eb94880f5beac5c69fb2e42393fec6c279b.zip
[ObjectYAML] Pull DWARF support into DWARFYAML namespace
Since DWARF formatting is agnostic to the object file it is stored in, it doesn't make sense for this to be in the MachOYAML implementation. Pulling it into its own namespace means we could modify the ELF and COFF YAML tools to emit DWARF as well. In a follow-up patch I will better abstract this in obj2yaml and yaml2obj so that the DWARF bits in the tools can be re-used too. llvm-svn: 288984
Diffstat (limited to 'llvm/lib/ObjectYAML/MachOYAML.cpp')
-rw-r--r--llvm/lib/ObjectYAML/MachOYAML.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/ObjectYAML/MachOYAML.cpp b/llvm/lib/ObjectYAML/MachOYAML.cpp
index 41bbf9d0571..7ebb1bed088 100644
--- a/llvm/lib/ObjectYAML/MachOYAML.cpp
+++ b/llvm/lib/ObjectYAML/MachOYAML.cpp
@@ -29,10 +29,6 @@ bool MachOYAML::LinkEditData::isEmpty() const {
NameList.size() + StringTable.size();
}
-bool MachOYAML::DWARFData::isEmpty() const {
- return 0 == DebugStrings.size() + AbbrevDecls.size();
-}
-
namespace yaml {
void ScalarTraits<char_16>::output(const char_16 &Val, void *,
@@ -557,26 +553,6 @@ void MappingTraits<MachO::version_min_command>::mapping(
IO.mapRequired("sdk", LoadCommand.sdk);
}
-void MappingTraits<MachOYAML::DWARFData>::mapping(
- IO &IO, MachOYAML::DWARFData &DWARF) {
- IO.mapOptional("debug_str", DWARF.DebugStrings);
- IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls);
-}
-
-void MappingTraits<MachOYAML::DWARFAbbrev>::mapping(
- IO &IO, MachOYAML::DWARFAbbrev &Abbrev) {
- IO.mapRequired("Code", Abbrev.Code);
- IO.mapRequired("Tag", Abbrev.Tag);
- IO.mapRequired("Children", Abbrev.Children);
- IO.mapRequired("Attributes", Abbrev.Attributes);
-}
-
-void MappingTraits<MachOYAML::DWARFAttributeAbbrev>::mapping(
- IO &IO, MachOYAML::DWARFAttributeAbbrev &AttAbbrev) {
- IO.mapRequired("Attribute", AttAbbrev.Attribute);
- IO.mapRequired("Form", AttAbbrev.Form);
-}
-
} // namespace llvm::yaml
} // namespace llvm
OpenPOWER on IntegriCloud