[PATCH] D143537: [Object][NFC] Factor out computeHeadersSize.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 13:03:20 PDT 2023


efriedma added inline comments.


================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:697
   uint64_t LastMemberEndOffset =
-      isAIXBigArchive(Kind) ? sizeof(object::BigArchive::FixLenHdr) : 8;
+      isAIXBigArchive(Kind) ? sizeof(object::BigArchive::FixLenHdr) : 0;
   uint64_t LastMemberHeaderOffset = LastMemberEndOffset;
----------------
It's not obvious to me what this constant 8 was supposed to mean, or why it's changing to zero.


================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:708
 
+  uint64_t HeadersSize = 0;
+
----------------
Please use `Optional<uint64_t>` to clarify the intent here.


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

https://reviews.llvm.org/D143537



More information about the llvm-commits mailing list