[PATCH] D67486: [Alignment] Introduce llvm::Align to MCSection

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 08:02:53 PDT 2019


courbet added inline comments.


================
Comment at: llvm/lib/MC/MachObjectWriter.cpp:243
   W.write<uint32_t>(FileOffset);
-
-  assert(isPowerOf2_32(Section.getAlignment()) && "Invalid alignment!");
-  W.write<uint32_t>(Log2_32(Section.getAlignment()));
+  W.write<uint32_t>(Log2(Section.getAlignment()));
   W.write<uint32_t>(NumRelocations ? RelocationsStart : 0);
----------------
Oh, and this calls `Log2(double)`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67486





More information about the llvm-commits mailing list