[ObjectYAML] Rename DWARF entries to match section names
authorChris Bieneman <beanz@apple.com>
Wed, 7 Dec 2016 21:09:37 +0000 (21:09 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 7 Dec 2016 21:09:37 +0000 (21:09 +0000)
This change makes the yaml tags for the members of the DWARF data match the names of the DWARF sections.

llvm-svn: 288981

llvm/lib/ObjectYAML/MachOYAML.cpp
llvm/test/ObjectYAML/MachO/DWARF-debug_abbrev.yaml
llvm/test/ObjectYAML/MachO/DWARF-debug_str.yaml

index 4555430..41bbf9d 100644 (file)
@@ -559,8 +559,8 @@ void MappingTraits<MachO::version_min_command>::mapping(
 
 void MappingTraits<MachOYAML::DWARFData>::mapping(
     IO &IO, MachOYAML::DWARFData &DWARF) {
-  IO.mapOptional("DebugStrings", DWARF.DebugStrings);
-  IO.mapOptional("AbbrevDecls", DWARF.AbbrevDecls);
+  IO.mapOptional("debug_str", DWARF.DebugStrings);
+  IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls);
 }
 
 void MappingTraits<MachOYAML::DWARFAbbrev>::mapping(
index b874c27..0736514 100644 (file)
@@ -286,7 +286,7 @@ LoadCommands:
         reserved2:       0x00000000
         reserved3:       0x00000000
 DWARF:           
-  AbbrevDecls:     
+  debug_abbrev:     
     - Code:            0x00000001
       Tag:             DW_TAG_compile_unit
       Children:        DW_CHILDREN_yes
@@ -360,7 +360,7 @@ DWARF:
 ...
 
 #CHECK: DWARF:           
-#CHECK:   AbbrevDecls:     
+#CHECK:   debug_abbrev:     
 #CHECK:     - Code:            0x00000001
 #CHECK:       Tag:             DW_TAG_compile_unit
 #CHECK:       Children:        DW_CHILDREN_yes
index c0557bc..417a755 100644 (file)
@@ -240,7 +240,7 @@ LinkEditData:
     - __mh_execute_header
     - _main
 DWARF:           
-  DebugStrings:    
+  debug_str:    
     - ''
     - 'clang version 4.0.0 (trunk 288677) (llvm/trunk 288676)'
     - hello_world.c
@@ -253,7 +253,7 @@ DWARF:
 ...
 
 #CHECK: DWARF:           
-#CHECK:   DebugStrings:    
+#CHECK:   debug_str:    
 #CHECK:     - ''
 #CHECK:     - 'clang version 4.0.0 (trunk 288677) (llvm/trunk 288676)'
 #CHECK:     - hello_world.c