This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b5dc150b986: ADT: Change AlignedCharArrayUnion to an alias 
of std::aligned_union_t, NFC (authored by dexonsmith).

Changed prior to commit:
  https://reviews.llvm.org/D92512?vs=309071&id=309600#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92512

Files:
  llvm/include/llvm/Support/AlignOf.h


Index: llvm/include/llvm/Support/AlignOf.h
===================================================================
--- llvm/include/llvm/Support/AlignOf.h
+++ llvm/include/llvm/Support/AlignOf.h
@@ -20,13 +20,11 @@
 /// A suitably aligned and sized character array member which can hold elements
 /// of any type.
 ///
-/// These types may be arrays, structs, or any other types. This exposes a
-/// `buffer` member which can be used as suitable storage for a placement new 
of
-/// any of these types.
-template <typename T, typename... Ts> struct AlignedCharArrayUnion {
-  using AlignedUnion = std::aligned_union_t<1, T, Ts...>;
-  alignas(alignof(AlignedUnion)) char buffer[sizeof(AlignedUnion)];
-};
+/// These types may be arrays, structs, or any other types. Underneath is a
+/// char buffer member which can be used as suitable storage for a placement
+/// new of any of these types.
+template <typename T, typename... Ts>
+using AlignedCharArrayUnion = std::aligned_union_t<1, T, Ts...>;
 
 } // end namespace llvm
 


Index: llvm/include/llvm/Support/AlignOf.h
===================================================================
--- llvm/include/llvm/Support/AlignOf.h
+++ llvm/include/llvm/Support/AlignOf.h
@@ -20,13 +20,11 @@
 /// A suitably aligned and sized character array member which can hold elements
 /// of any type.
 ///
-/// These types may be arrays, structs, or any other types. This exposes a
-/// `buffer` member which can be used as suitable storage for a placement new of
-/// any of these types.
-template <typename T, typename... Ts> struct AlignedCharArrayUnion {
-  using AlignedUnion = std::aligned_union_t<1, T, Ts...>;
-  alignas(alignof(AlignedUnion)) char buffer[sizeof(AlignedUnion)];
-};
+/// These types may be arrays, structs, or any other types. Underneath is a
+/// char buffer member which can be used as suitable storage for a placement
+/// new of any of these types.
+template <typename T, typename... Ts>
+using AlignedCharArrayUnion = std::aligned_union_t<1, T, Ts...>;
 
 } // end namespace llvm
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to