summaryrefslogtreecommitdiff
path: root/include/clang/Sema
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2019-07-29 23:12:48 +0000
committerJF Bastien <jfbastien@apple.com>2019-07-29 23:12:48 +0000
commit6dabc75940d66b32052fc93d1c9904e5fd65fcad (patch)
treef7cf3c30bc9a99e2fbbd526bbbcd58d3e33452c7 /include/clang/Sema
parentcb15cf86d9f70d93d4778b85f970346280bb0978 (diff)
downloadclang-6dabc75940d66b32052fc93d1c9904e5fd65fcad.tar.gz
[NFC] avoid AlignedCharArray in clang
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema')
-rw-r--r--include/clang/Sema/Overload.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Sema/Overload.h b/include/clang/Sema/Overload.h
index 96aadeac2b..e9280103a3 100644
--- a/include/clang/Sema/Overload.h
+++ b/include/clang/Sema/Overload.h
@@ -881,7 +881,7 @@ class Sema;
constexpr static unsigned NumInlineBytes =
24 * sizeof(ImplicitConversionSequence);
unsigned NumInlineBytesUsed = 0;
- llvm::AlignedCharArray<alignof(void *), NumInlineBytes> InlineSpace;
+ alignas(void *) char InlineSpace[NumInlineBytes];
// Address space of the object being constructed.
LangAS DestAS = LangAS::Default;
@@ -904,7 +904,7 @@ class Sema;
unsigned NBytes = sizeof(T) * N;
if (NBytes > NumInlineBytes - NumInlineBytesUsed)
return SlabAllocator.Allocate<T>(N);
- char *FreeSpaceStart = InlineSpace.buffer + NumInlineBytesUsed;
+ char *FreeSpaceStart = InlineSpace + NumInlineBytesUsed;
assert(uintptr_t(FreeSpaceStart) % alignof(void *) == 0 &&
"Misaligned storage!");