[PATCH] D153356: [Align] Add isAligned taking an APInt

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 06:52:47 PDT 2023


gchatelet added inline comments.


================
Comment at: llvm/include/llvm/ADT/APInt.h:440
+  /// provided value.
+  bool isAligned(const Align &A) const {
+    if (isZero())
----------------
arsenm wrote:
> Pass by value or just use the unsigned?
If we pass by value then we can't forward declare anymore as layout information is needed to copy the value.
Using `uint64_t` means giving up on types and writing `.value()` at all call sites.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153356



More information about the llvm-commits mailing list