[llvm] r336157 - [demangler] Fix a MSVC alignment warning.
Erik Pilkington via llvm-commits
llvm-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:
llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
Modified: llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/ItaniumDemangle.cpp?rev=336157&r1=336156&r2=336157&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/ItaniumDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/ItaniumDemangle.cpp Mon Jul 2 17:23:18 2018
@@ -17,6 +17,7 @@
#include <cassert>
#include <cctype>
#include <cstdio>
+#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <numeric>
@@ -1950,7 +1951,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 llvm-commits
mailing list