[PATCH] D65452: [Support] Workaround a GCC 4.8 bug on constant expression evaluation.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 09:11:22 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL367329: [Support] Workaround a GCC 4.8 bug on constant expression evaluation. (authored by hliao, committed by ).
Herald added a subscriber: kristina.

Changed prior to commit:
  https://reviews.llvm.org/D65452?vs=212349&id=212359#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D65452

Files:
  llvm/trunk/include/llvm/Support/Endian.h


Index: llvm/trunk/include/llvm/Support/Endian.h
===================================================================
--- llvm/trunk/include/llvm/Support/Endian.h
+++ llvm/trunk/include/llvm/Support/Endian.h
@@ -205,7 +205,8 @@
 
 template<typename ValueType,
          endianness Endian,
-         std::size_t Alignment>
+         std::size_t Alignment,
+         std::size_t ALIGN = PickAlignment<ValueType, Alignment>::value>
 struct packed_endian_specific_integral {
   using value_type = ValueType;
   static constexpr endianness endian = Endian;
@@ -247,8 +248,7 @@
 
 private:
   struct {
-    alignas(PickAlignment<value_type,
-                          alignment>::value) char buffer[sizeof(value_type)];
+    LLVM_ALIGNAS(ALIGN) char buffer[sizeof(value_type)];
   } Value;
 
 public:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65452.212359.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190730/6c5c2fd4/attachment.bin>


More information about the llvm-commits mailing list