[PATCH] D84911: [DWARFYAML] Make the 'Length' field of the address range table optional.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 00:34:01 PDT 2020


Higuoxing added inline comments.


================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:145
+
+    uint64_t PaddedHeaderLength = alignTo(HeaderLength, AddrSize * 2);
+    Length += PaddedHeaderLength - HeaderLength;
----------------
MaskRay wrote:
> `const uint64_t PaddedHeaderLength`
Done!


================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:149
+
+    if (Range.Length)
+      Length = *Range.Length;
----------------
MaskRay wrote:
> You can move Length assignment above to the else branch.
It's not easy to do that since the `PaddedHeaderLength` and `HeaderLength` is used below. If we move the length assignment above to the else branch, we might need to duplicate some logic.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84911/new/

https://reviews.llvm.org/D84911



More information about the llvm-commits mailing list