[PATCH] D61698: [COFF] Store alignment in log2 form, NFC

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 04:59:05 PDT 2019


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lld/COFF/Chunks.h:70
+    assert(llvm::isPowerOf2_32(Align) && "alignment is not a power of 2");
+    P2Align = llvm::Log2_32(Align);
+  }
----------------
A little off-topic, but llvm::Log2_32 seems to be a redundant function, as I think we can just use countTrailingZeros.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61698





More information about the llvm-commits mailing list