Remove possible trailing padding from aligned_storage. Patch from Yiran Wang
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@248309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf94e48216
commit
514c831504
@ -1190,7 +1190,7 @@ struct _LIBCPP_TYPE_VIS_ONLY aligned_storage
|
|||||||
union type
|
union type
|
||||||
{
|
{
|
||||||
_Aligner __align;
|
_Aligner __align;
|
||||||
unsigned char __data[_Len];
|
unsigned char __data[(_Len + _Align - 1)/_Align * _Align];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1205,7 +1205,7 @@ struct _LIBCPP_TYPE_VIS_ONLY aligned_storage<_Len, n>\
|
|||||||
{\
|
{\
|
||||||
struct _ALIGNAS(n) type\
|
struct _ALIGNAS(n) type\
|
||||||
{\
|
{\
|
||||||
unsigned char __lx[_Len];\
|
unsigned char __lx[(_Len + n - 1)/n * n];\
|
||||||
};\
|
};\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user