[libcxxabi] r336157 - [demangler] Fix a MSVC alignment warning.
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 2 17:23:18 PDT 2018
Author: epilk
Date: Mon Jul 2 17:23:18 2018
New Revision: 336157
URL: http://llvm.org/viewvc/llvm-project?rev=336157&view=rev
Log:
[demangler] Fix a MSVC alignment warning.
This should fix llvm.org/PR37944
Modified:
libcxxabi/trunk/src/cxa_demangle.cpp
Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=336157&r1=336156&r2=336157&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Mon Jul 2 17:23:18 2018
@@ -19,6 +19,7 @@
#include <algorithm>
#include <numeric>
#include <cassert>
+#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
@@ -1890,7 +1891,7 @@ class BumpPointerAllocator {
static constexpr size_t AllocSize = 4096;
static constexpr size_t UsableAllocSize = AllocSize - sizeof(BlockMeta);
- alignas(16) char InitialBuffer[AllocSize];
+ alignas(std::max_align_t) char InitialBuffer[AllocSize];
BlockMeta* BlockList = nullptr;
void grow() {
More information about the cfe-commits
mailing list