[llvm] 7ad6ea5 - [DWARFYAML][debug_aranges] Use yaml::Hex64 rather than uint64_t as length. NFC.

Xing GUO via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 08:31:31 PDT 2020


Author: Xing GUO
Date: 2020-07-31T23:31:04+08:00
New Revision: 7ad6ea520fe49e9320bd15a4daf88e36259efedc

URL: https://github.com/llvm/llvm-project/commit/7ad6ea520fe49e9320bd15a4daf88e36259efedc
DIFF: https://github.com/llvm/llvm-project/commit/7ad6ea520fe49e9320bd15a4daf88e36259efedc.diff

LOG: [DWARFYAML][debug_aranges] Use yaml::Hex64 rather than uint64_t as length. NFC.

It's better to use yaml::Hex64 as length in the tuples of the address
range table.

Added: 
    

Modified: 
    llvm/include/llvm/ObjectYAML/DWARFYAML.h
    llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ObjectYAML/DWARFYAML.h b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
index 5737ceccc0a4..127a52913978 100644
--- a/llvm/include/llvm/ObjectYAML/DWARFYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
@@ -61,7 +61,7 @@ struct Abbrev {
 
 struct ARangeDescriptor {
   llvm::yaml::Hex64 Address;
-  uint64_t Length;
+  yaml::Hex64 Length;
 };
 
 struct ARange {

diff  --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml b/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
index 1e9b880c3cd3..762fcbfa2d22 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_aranges.yaml
@@ -333,7 +333,7 @@ DWARF:
 # CHECK-NEXT:       AddressSize:         0x08
 # CHECK-NEXT:       Descriptors:
 # CHECK-NEXT:         - Address: 0x0000000100000F50
-# CHECK-NEXT:           Length:  52
+# CHECK-NEXT:           Length:  0x0000000000000034
 
 ## b) Test that if the "debug_aranges" entry is empty, yaml2macho will only emit the
 ## section header.


        


More information about the llvm-commits mailing list