[PATCH] D68936: [Alignment][NFC] Support compile time constants

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 01:42:05 PDT 2019


courbet added inline comments.


================
Comment at: llvm/include/llvm/Support/Alignment.h:56
 
+  /// A trivial type to allow construction of constexpr Align.
+  struct LogValue {
----------------
Add a comment to explain why we need this (gcc bug)


================
Comment at: llvm/unittests/Support/AlignmentTest.cpp:25
+TEST(AlignmentTest, AlignOfConstant) {
+  EXPECT_EQ(Align::Of<uint8_t>(), Align(sizeof(uint8_t)));
+  EXPECT_EQ(Align::Of<uint16_t>(), Align(sizeof(uint16_t)));
----------------
alignof


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68936





More information about the llvm-commits mailing list