mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 14:46:07 +00:00
[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:
parent
d9e55fa521
commit
993145f954
@ -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 {
|
||||
|
@ -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];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user