From e52a0d445d3eba3f41d00b1356c52b4cc624afd1 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron@aaronballman.com>
Date: Fri, 17 Apr 2015 19:35:44 +0000
Subject: [PATCH] Suppressing the C4324 warnings generated by MSVC. This is the
 only declarative instance that would generate the warning, but it accounted
 for about 525+ warnings due to template instantiations. This is a
 marginal-value warning which we may decide to disable more broadly, but since
 this header is in Support and may be used out of tree, it's a low burden for
 us to be warning-free in this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235219 91177308-0d34-0410-b5e6-96231b3b80d8
---
 include/llvm/Support/AlignOf.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/llvm/Support/AlignOf.h b/include/llvm/Support/AlignOf.h
index 061d5acf232..4e0a899fbbe 100644
--- a/include/llvm/Support/AlignOf.h
+++ b/include/llvm/Support/AlignOf.h
@@ -22,6 +22,11 @@ namespace llvm {
 template <typename T>
 struct AlignmentCalcImpl {
   char x;
+#if defined(_MSC_VER)
+// Disables "structure was padded due to __declspec(align())" warnings that are
+// generated by any class using AlignOf<T> with a manually specified alignment.
+#pragma warning(suppress : 4324)
+#endif
   T t;
 private:
   AlignmentCalcImpl() {} // Never instantiate.
-- 
2.40.0