[PATCH] D65521: [LLVM][Alignment] Introduce Alignment Type in DataLayout

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 09:55:40 PDT 2019


jfb added inline comments.


================
Comment at: llvm/include/llvm/IR/DataLayout.h:269
 
-  unsigned getStackAlignment() const { return StackNaturalAlign; }
+  unsigned getStackAlignment() const { return StackNaturalAlign ? StackNaturalAlign->value() : 0; }
   unsigned getAllocaAddrSpace() const { return AllocaAddrSpace; }
----------------
Return `MaybeAlign` here? Or in a future patch?


================
Comment at: llvm/include/llvm/IR/DataLayout.h:275
   /// \see getFunctionPtrAlignType
-  unsigned getFunctionPtrAlign() const { return FunctionPtrAlign; }
+  unsigned getFunctionPtrAlign() const { return FunctionPtrAlign ? FunctionPtrAlign->value() : 0; }
 
----------------
Ditto.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65521





More information about the llvm-commits mailing list