summaryrefslogtreecommitdiff
path: root/lib/ObjectYAML/DWARFYAML.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2017-01-10 05:31:23 +0000
committerChris Bieneman <beanz@apple.com>2017-01-10 05:31:23 +0000
commit2d737382e28b0344836ef8a292141413281d873c (patch)
treedfc1788ac1dd3ff0e6337ccbbf5931040d48b1d9 /lib/ObjectYAML/DWARFYAML.cpp
parente8209239b1bec45de27282f71c6ee5419d11786b (diff)
Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291541. Still failing on a bot: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47224/steps/test_llvm/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ObjectYAML/DWARFYAML.cpp')
-rw-r--r--lib/ObjectYAML/DWARFYAML.cpp66
1 files changed, 10 insertions, 56 deletions
diff --git a/lib/ObjectYAML/DWARFYAML.cpp b/lib/ObjectYAML/DWARFYAML.cpp
index 30bcabf72ff..42a448a7bdf 100644
--- a/lib/ObjectYAML/DWARFYAML.cpp
+++ b/lib/ObjectYAML/DWARFYAML.cpp
@@ -27,18 +27,17 @@ void MappingTraits<DWARFYAML::Data>::mapping(IO &IO, DWARFYAML::Data &DWARF) {
IO.setContext(&DWARF);
IO.mapOptional("debug_str", DWARF.DebugStrings);
IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls);
- if (!DWARF.ARanges.empty() || !IO.outputting())
+ if(!DWARF.ARanges.empty() || !IO.outputting())
IO.mapOptional("debug_aranges", DWARF.ARanges);
- if (!DWARF.PubNames.Entries.empty() || !IO.outputting())
+ if(!DWARF.PubNames.Entries.empty() || !IO.outputting())
IO.mapOptional("debug_pubnames", DWARF.PubNames);
- if (!DWARF.PubTypes.Entries.empty() || !IO.outputting())
+ if(!DWARF.PubTypes.Entries.empty() || !IO.outputting())
IO.mapOptional("debug_pubtypes", DWARF.PubTypes);
- if (!DWARF.GNUPubNames.Entries.empty() || !IO.outputting())
+ if(!DWARF.GNUPubNames.Entries.empty() || !IO.outputting())
IO.mapOptional("debug_gnu_pubnames", DWARF.GNUPubNames);
- if (!DWARF.GNUPubTypes.Entries.empty() || !IO.outputting())
+ if(!DWARF.GNUPubTypes.Entries.empty() || !IO.outputting())
IO.mapOptional("debug_gnu_pubtypes", DWARF.GNUPubTypes);
IO.mapOptional("debug_info", DWARF.CompileUnits);
- IO.mapOptional("debug_line", DWARF.DebugLines);
IO.setContext(&oldContext);
}
@@ -63,7 +62,7 @@ void MappingTraits<DWARFYAML::ARangeDescriptor>::mapping(
}
void MappingTraits<DWARFYAML::ARange>::mapping(IO &IO,
- DWARFYAML::ARange &Range) {
+ DWARFYAML::ARange &Range) {
IO.mapRequired("Length", Range.Length);
IO.mapRequired("Version", Range.Version);
IO.mapRequired("CuOffset", Range.CuOffset);
@@ -107,60 +106,15 @@ void MappingTraits<DWARFYAML::Entry>::mapping(IO &IO, DWARFYAML::Entry &Entry) {
IO.mapRequired("Values", Entry.Values);
}
-void MappingTraits<DWARFYAML::FormValue>::mapping(
- IO &IO, DWARFYAML::FormValue &FormValue) {
+void MappingTraits<DWARFYAML::FormValue>::mapping(IO &IO,
+ DWARFYAML::FormValue &FormValue) {
IO.mapOptional("Value", FormValue.Value);
- if (!FormValue.CStr.empty() || !IO.outputting())
+ if(!FormValue.CStr.empty() || !IO.outputting())
IO.mapOptional("CStr", FormValue.CStr);
- if (!FormValue.BlockData.empty() || !IO.outputting())
+ if(!FormValue.BlockData.empty() || !IO.outputting())
IO.mapOptional("BlockData", FormValue.BlockData);
}
-void MappingTraits<DWARFYAML::File>::mapping(IO &IO, DWARFYAML::File &File) {
- IO.mapRequired("Name", File.Name);
- IO.mapRequired("DirIdx", File.DirIdx);
- IO.mapRequired("ModTime", File.ModTime);
- IO.mapRequired("Length", File.Length);
-}
-
-void MappingTraits<DWARFYAML::LineTableOpcode>::mapping(
- IO &IO, DWARFYAML::LineTableOpcode &LineTableOpcode) {
- IO.mapRequired("Opcode", LineTableOpcode.Opcode);
- if (LineTableOpcode.Opcode == dwarf::DW_LNS_extended_op) {
- IO.mapRequired("ExtLen", LineTableOpcode.ExtLen);
- IO.mapRequired("SubOpcode", LineTableOpcode.SubOpcode);
- }
-
- if (!LineTableOpcode.UnknownOpcodeData.empty() || !IO.outputting())
- IO.mapOptional("UnknownOpcodeData", LineTableOpcode.UnknownOpcodeData);
- if (!LineTableOpcode.UnknownOpcodeData.empty() || !IO.outputting())
- IO.mapOptional("StandardOpcodeData", LineTableOpcode.StandardOpcodeData);
- if (!LineTableOpcode.FileEntry.Name.empty() || !IO.outputting())
- IO.mapOptional("FileEntry", LineTableOpcode.FileEntry);
- if (LineTableOpcode.Opcode == dwarf::DW_LNS_advance_line || !IO.outputting())
- IO.mapOptional("SData", LineTableOpcode.SData);
- IO.mapOptional("Data", LineTableOpcode.Data);
-}
-
-void MappingTraits<DWARFYAML::LineTable>::mapping(
- IO &IO, DWARFYAML::LineTable &LineTable) {
- IO.mapRequired("TotalLength", LineTable.TotalLength);
- if (LineTable.TotalLength == UINT32_MAX)
- IO.mapRequired("TotalLength64", LineTable.TotalLength64);
- IO.mapRequired("Version", LineTable.Version);
- IO.mapRequired("PrologueLength", LineTable.PrologueLength);
- IO.mapRequired("MinInstLength", LineTable.MinInstLength);
- IO.mapRequired("MaxOpsPerInst", LineTable.MaxOpsPerInst);
- IO.mapRequired("DefaultIsStmt", LineTable.DefaultIsStmt);
- IO.mapRequired("LineBase", LineTable.LineBase);
- IO.mapRequired("LineRange", LineTable.LineRange);
- IO.mapRequired("OpcodeBase", LineTable.OpcodeBase);
- IO.mapRequired("StandardOpcodeLengths", LineTable.StandardOpcodeLengths);
- IO.mapRequired("IncludeDirs", LineTable.IncludeDirs);
- IO.mapRequired("Files", LineTable.Files);
- IO.mapRequired("Opcodes", LineTable.Opcodes);
-}
-
} // namespace llvm::yaml
} // namespace llvm