[NFC] avoid AlignedCharArray in LLVM

As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

llvm-svn: 367277
This commit is contained in:
JF Bastien 2019-07-29 23:37:48 +00:00
parent d9e55fa521
commit 993145f954
2 changed files with 7 additions and 3 deletions

View File

@ -246,8 +246,10 @@ struct packed_endian_specific_integral {
}
private:
AlignedCharArray<PickAlignment<value_type, alignment>::value,
sizeof(value_type)> Value;
struct {
alignas(PickAlignment<value_type,
alignment>::value) char buffer[sizeof(value_type)];
} Value;
public:
struct ref {

View File

@ -369,7 +369,9 @@ public:
template <typename... Tys> struct FixedSizeStorage {
template <size_t... Counts> struct with_counts {
enum { Size = totalSizeToAlloc<Tys...>(Counts...) };
typedef llvm::AlignedCharArray<alignof(BaseTy), Size> type;
struct type {
alignas(BaseTy) char buffer[Size];
};
};
};