[PATCH] D95050: Make Value::MaxAlignment(Exponent) constexpr

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 26 02:10:46 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG581613413c27: Make Value::MaxAlignment(Exponent) constexpr (authored by arichardson).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95050

Files:
  llvm/include/llvm/IR/Value.h


Index: llvm/include/llvm/IR/Value.h
===================================================================
--- llvm/include/llvm/IR/Value.h
+++ llvm/include/llvm/IR/Value.h
@@ -781,8 +781,8 @@
   ///
   /// This is the greatest alignment value supported by load, store, and alloca
   /// instructions, and global values.
-  static const unsigned MaxAlignmentExponent = 29;
-  static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent;
+  static constexpr unsigned MaxAlignmentExponent = 29;
+  static constexpr unsigned MaximumAlignment = 1u << MaxAlignmentExponent;
 
   /// Mutate the type of this Value to be of the specified type.
   ///


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95050.368835.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210826/15bdf94c/attachment.bin>


More information about the llvm-commits mailing list