[llvm] bfa1403 - [DWARFYAML] Make the field names consistent with the DWARF spec. NFC.
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 08:12:01 PDT 2020
Author: Xing GUO
Date: 2020-07-29T23:10:08+08:00
New Revision: bfa140376df89eea4e984ad983b1809f60187b7e
URL: https://github.com/llvm/llvm-project/commit/bfa140376df89eea4e984ad983b1809f60187b7e
DIFF: https://github.com/llvm/llvm-project/commit/bfa140376df89eea4e984ad983b1809f60187b7e.diff
LOG: [DWARFYAML] Make the field names consistent with the DWARF spec. NFC.
This patch replaces 'AddrSize'/'SegSize' with
'AddressSize'/'SegmentSelectorSize'. NFC.
Added:
Modified:
llvm/lib/ObjectYAML/DWARFYAML.cpp
llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml
llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
Removed:
################################################################################
diff --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp b/llvm/lib/ObjectYAML/DWARFYAML.cpp
index adc167249226b..fda1ba797a916 100644
--- a/llvm/lib/ObjectYAML/DWARFYAML.cpp
+++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp
@@ -106,8 +106,8 @@ void MappingTraits<DWARFYAML::ARange>::mapping(IO &IO,
IO.mapRequired("Length", ARange.Length);
IO.mapRequired("Version", ARange.Version);
IO.mapRequired("CuOffset", ARange.CuOffset);
- IO.mapRequired("AddrSize", ARange.AddrSize);
- IO.mapRequired("SegSize", ARange.SegSize);
+ IO.mapRequired("AddressSize", ARange.AddrSize);
+ IO.mapRequired("SegmentSelectorSize", ARange.SegSize);
IO.mapRequired("Descriptors", ARange.Descriptors);
}
diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
index 2953317518795..868054b08a991 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
@@ -313,22 +313,22 @@ LinkEditData:
- _main
DWARF:
debug_aranges:
- - Length: 44
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 44
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100000F50
Length: 52
...
# CHECK: debug_aranges:
-# CHECK-NEXT: - Length: 0x000000000000002C
-# CHECK-NEXT: Version: 2
-# CHECK-NEXT: CuOffset: 0x0000000000000000
-# CHECK-NEXT: AddrSize: 0x08
-# CHECK-NEXT: SegSize: 0x00
+# CHECK-NEXT: - Length: 0x000000000000002C
+# CHECK-NEXT: Version: 2
+# CHECK-NEXT: CuOffset: 0x0000000000000000
+# CHECK-NEXT: AddressSize: 0x08
+# CHECK-NEXT: SegmentSelectorSize: 0x00
# CHECK-NEXT: Descriptors:
# CHECK-NEXT: - Address: 0x0000000100000F50
# CHECK-NEXT: Length: 52
diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
index 1ca45f5dadfed..937c84b863a67 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
@@ -381,11 +381,11 @@ DWARF:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_aranges:
- - Length: 44
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 44
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100000F50
Length: 52
diff --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
index 6575e95ed2126..5acca5ccb7fc3 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
@@ -394,11 +394,11 @@ DWARF:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_aranges:
- - Length: 44
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 44
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100000F50
Length: 52
diff --git a/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml b/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
index fc2280066c0c0..c41348477a965 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
@@ -381,11 +381,11 @@ DWARF:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_aranges:
- - Length: 44
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 44
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100000F50
Length: 52
diff --git a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
index aef062428e8f4..ebb82b5492e6a 100644
--- a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
+++ b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
@@ -378,11 +378,11 @@ Slices:
- Attribute: DW_AT_type
Form: DW_FORM_ref_addr
debug_aranges:
- - Length: 28
- Version: 2
- CuOffset: 0
- AddrSize: 4
- SegSize: 0
+ - Length: 28
+ Version: 2
+ CuOffset: 0
+ AddressSize: 4
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x000000000000BFF0
Length: 16
@@ -856,11 +856,11 @@ Slices:
- Attribute: DW_AT_type
Form: DW_FORM_ref_addr
debug_aranges:
- - Length: 44
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 44
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100007F9C
Length: 28
diff --git a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
index 1368257964166..fa642d1120679 100644
--- a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
+++ b/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
@@ -539,11 +539,11 @@ DWARF:
- Attribute: DW_AT_type
Form: DW_FORM_ref_addr
debug_aranges:
- - Length: 60
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 60
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100000F70
Length: 17
diff --git a/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml b/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml
index 8f392bc6b7003..bde5499cf1a75 100644
--- a/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml
+++ b/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml
@@ -287,11 +287,11 @@ LoadCommands:
reserved3: 0x00000000
DWARF:
debug_aranges:
- - Length: 45
- Version: 2
- CuOffset: 0
- AddrSize: 8
- SegSize: 0
+ - Length: 45
+ Version: 2
+ CuOffset: 0
+ AddressSize: 8
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x0000000100000F50
Length: 52
diff --git a/llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml b/llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
index 78d0b15c26a07..b1064a9ae2153 100644
--- a/llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
+++ b/llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
@@ -69,21 +69,21 @@ FileHeader:
Machine: EM_X86_64
DWARF:
debug_aranges:
- - Format: [[FORMAT]]
- Length: 0x2c
- Version: 2
- CuOffset: 0
- AddrSize: 0x04
- SegSize: 0x00
+ - Format: [[FORMAT]]
+ Length: 0x2c
+ Version: 2
+ CuOffset: 0
+ AddressSize: 0x04
+ SegmentSelectorSize: 0x00
Descriptors:
- Address: 0x00001234
Length: 0x20
- - Format: [[FORMAT]]
- Length: 0x2c
- Version: 2
- CuOffset: 0x65
- AddrSize: 0x08
- SegSize: 0x00
+ - Format: [[FORMAT]]
+ Length: 0x2c
+ Version: 2
+ CuOffset: 0x65
+ AddressSize: 0x08
+ SegmentSelectorSize: 0x00
Descriptors:
- Address: 0x0000000000005678
Length: 0x20
@@ -307,11 +307,11 @@ Sections:
Size: 0x10
DWARF:
debug_aranges:
- - Length: 0x2c
- Version: 2
- CuOffset: 0
- AddrSize: 0x08
- SegSize: 0x00
+ - Length: 0x2c
+ Version: 2
+ CuOffset: 0
+ AddressSize: 0x08
+ SegmentSelectorSize: 0x00
Descriptors:
- Address: 0x0000000000001234
Length: 0x20
@@ -333,11 +333,11 @@ Sections:
Content: "00"
DWARF:
debug_aranges:
- - Length: 0x2c
- Version: 2
- CuOffset: 0
- AddrSize: 0x08
- SegSize: 0x00
+ - Length: 0x2c
+ Version: 2
+ CuOffset: 0
+ AddressSize: 0x08
+ SegmentSelectorSize: 0x00
Descriptors:
- Address: 0x0000000000001234
Length: 0x20
@@ -398,11 +398,11 @@ Sections:
Type: SHT_STRTAB
DWARF:
debug_aranges:
- - Length: 0x2c
- Version: 2
- CuOffset: 0
- AddrSize: 0x08
- SegSize: 0x00
+ - Length: 0x2c
+ Version: 2
+ CuOffset: 0
+ AddressSize: 0x08
+ SegmentSelectorSize: 0x00
Descriptors:
- Address: 0x0000000000001234
Length: 0x20
@@ -427,12 +427,12 @@ FileHeader:
Machine: EM_X86_64
DWARF:
debug_aranges:
- - Length: 0x2c
- Version: 2
- CuOffset: 0
- AddrSize: 0x07 ## Invalid address_size.
- SegSize: 0
- Descriptors: []
+ - Length: 0x2c
+ Version: 2
+ CuOffset: 0
+ AddressSize: 0x07 ## Invalid address_size.
+ SegmentSelectorSize: 0
+ Descriptors: []
## i) Test that yaml2obj emits an error message if we try to assign an invalid value to
## 'AddrSize' when the 'Descriptors' list isn't empty.
@@ -450,11 +450,11 @@ FileHeader:
Machine: EM_X86_64
DWARF:
debug_aranges:
- - Length: 0x2c
- Version: 2
- CuOffset: 0
- AddrSize: 0x07 ## Invalid address_size.
- SegSize: 0
+ - Length: 0x2c
+ Version: 2
+ CuOffset: 0
+ AddressSize: 0x07 ## Invalid address_size.
+ SegmentSelectorSize: 0
Descriptors:
- Address: 0x1234
Length: 0x1000
More information about the llvm-commits
mailing list