summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Demangle/ItaniumDemangle.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2018-07-05 06:22:39 +0000
committerSerge Pavlov <sepavloff@gmail.com>2018-07-05 06:22:39 +0000
commit892bd81a6222eb8e3e0fb7ffab4ab536f75574a2 (patch)
tree89c316d6582e4d7e46b91357f96db9d6f3bf694a /llvm/lib/Demangle/ItaniumDemangle.cpp
parenta855e17f096d29e766362aa6e96ffe6d0c886ca2 (diff)
downloadbcm5719-llvm-892bd81a6222eb8e3e0fb7ffab4ab536f75574a2.tar.gz
bcm5719-llvm-892bd81a6222eb8e3e0fb7ffab4ab536f75574a2.zip
[demangler] Avoid alignment warning
The alignment specified by a constant for the field `BumpPointerAllocator::InitialBuffer` exceeded the alignment guaranteed by `malloc` and `new` on Windows. This change set the alignment value to that of `long double`, which is defined by the used platform. It fixes https://bugs.llvm.org/show_bug.cgi?id=37944. Differential Revision: https://reviews.llvm.org/D48889 llvm-svn: 336311
Diffstat (limited to 'llvm/lib/Demangle/ItaniumDemangle.cpp')
-rw-r--r--llvm/lib/Demangle/ItaniumDemangle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Demangle/ItaniumDemangle.cpp b/llvm/lib/Demangle/ItaniumDemangle.cpp
index 8dd182fad15..a2743bd3638 100644
--- a/llvm/lib/Demangle/ItaniumDemangle.cpp
+++ b/llvm/lib/Demangle/ItaniumDemangle.cpp
@@ -1950,7 +1950,7 @@ class BumpPointerAllocator {
static constexpr size_t AllocSize = 4096;
static constexpr size_t UsableAllocSize = AllocSize - sizeof(BlockMeta);
- alignas(16) char InitialBuffer[AllocSize];
+ alignas(long double) char InitialBuffer[AllocSize];
BlockMeta* BlockList = nullptr;
void grow() {
OpenPOWER on IntegriCloud