[llvm] r235522 - Recommit r235219, it's need for out-of-tree users of AlignOf.h.
Yaron Keren
yaron.keren at gmail.com
Wed Apr 22 09:43:56 PDT 2015
Author: yrnkrn
Date: Wed Apr 22 11:43:56 2015
New Revision: 235522
URL: http://llvm.org/viewvc/llvm-project?rev=235522&view=rev
Log:
Recommit r235219, it's need for out-of-tree users of AlignOf.h.
Modified:
llvm/trunk/include/llvm/Support/AlignOf.h
Modified: llvm/trunk/include/llvm/Support/AlignOf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/AlignOf.h?rev=235522&r1=235521&r2=235522&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/AlignOf.h (original)
+++ llvm/trunk/include/llvm/Support/AlignOf.h Wed Apr 22 11:43:56 2015
@@ -22,6 +22,14 @@ 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.
+// Although the warning is disabled in the LLVM project we need this pragma
+// as AlignOf.h is a published support header that's available for use
+// out-of-tree, and we would like that to ompile cleanly at /W4.
+#pragma warning(suppress : 4324)
+#endif
T t;
private:
AlignmentCalcImpl() {} // Never instantiate.
More information about the llvm-commits
mailing list