[PATCH] D138705: [Alignment][NFC] Use Align in MCSymbol::setCommon

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 00:46:48 PST 2022


courbet added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSymbol.h:345
   /// \param Target - Is the symbol a target-specific common-like symbol.
-  void setCommon(uint64_t Size, unsigned Align, bool Target = false) {
+  void setCommon(uint64_t Size, Align Align, bool Target = false) {
     assert(getOffset() == 0);
----------------
I can't convince myself that all callers pass a non-zero value for `Align`. In particular, I found that `AsmPrinter::emitGlobalVariable` does:

`OutStreamer->emitCommonSymbol(GVSym, Size, SupportsAlignment ? Alignment.value() : 0);`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138705



More information about the llvm-commits mailing list