[libcxx-commits] [PATCH] D46443: Add missing cstdalign header

Sam Clegg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 07:23:22 PST 2021


sbc100 updated this revision to Diff 328522.
sbc100 added a comment.
Herald added a project: libc++.
Herald added a reviewer: libc++.

Rebase against mono-repo


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D46443/new/

https://reviews.llvm.org/D46443

Files:
  libcxx/include/cstdalign
  libcxx/test/libcxx/min_max_macros.compile.pass.cpp
  libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp


Index: libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp
===================================================================
--- libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp
+++ libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp
@@ -13,6 +13,7 @@
 // Check that the size and alignment of any are what we expect.
 
 #include <any>
+#include <cstdalign>
 
 #include "test_macros.h"
 
Index: libcxx/test/libcxx/min_max_macros.compile.pass.cpp
===================================================================
--- libcxx/test/libcxx/min_max_macros.compile.pass.cpp
+++ libcxx/test/libcxx/min_max_macros.compile.pass.cpp
@@ -96,6 +96,8 @@
 TEST_MACROS();
 #include <csignal>
 TEST_MACROS();
+#include <cstdalign>
+TEST_MACROS();
 #include <cstdarg>
 TEST_MACROS();
 #include <cstdbool>
Index: libcxx/include/cstdalign
===================================================================
--- /dev/null
+++ libcxx/include/cstdalign
@@ -0,0 +1,33 @@
+// -*- C++ -*-
+//===--------------------------- cstdalign --------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_CSTDALIGN
+#define _LIBCPP_CSTDALIGN
+
+/*
+    cstdalign synopsis
+
+Macros:
+
+   alignof
+   alignas
+    __alignof_is_defined
+    __alignas_is_defined
+
+*/
+
+#include <__config>
+#include <stdalign.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
+#endif  // _LIBCPP_CSTDALIGN


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46443.328522.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210305/ba9107e8/attachment.bin>


More information about the libcxx-commits mailing list