[PATCH] D142708: [NFC] Transition GlobalObject alignment from MaybeAlign to Align

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 09:43:21 PST 2023


efriedma added a comment.

In D142708#4085789 <https://reviews.llvm.org/D142708#4085789>, @gchatelet wrote:

> Which is basically `std::max(InAlign, Align(1))` or simply `Align(1)` as I don't see an obvious value for `InAlign` other than `1`.

Some callers pass in other values.



================
Comment at: llvm/include/llvm/IR/GlobalObject.h:86
+  /// Sets the alignment attribute of the GlobalObject.
+  void setAlignment(Align Align);
+
----------------
Not sure I understand the point of overloading setAlignment; there's an implicit conversion from Align to MaybeAlign.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142708



More information about the llvm-commits mailing list