summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2019-07-31 03:22:08 +0000
committerJF Bastien <jfbastien@apple.com>2019-07-31 03:22:08 +0000
commite825b834ecbd322db137ae8b69b6450282846ee8 (patch)
tree790c758824eed5c8ceba123dcb5148768ebb454f
parente85f6bf66c989270816e67f81576f3d84430c9f9 (diff)
downloadbcm5719-llvm-e825b834ecbd322db137ae8b69b6450282846ee8.tar.gz
bcm5719-llvm-e825b834ecbd322db137ae8b69b6450282846ee8.zip
[NFC] Remove LLVM_ALIGNAS
Summary: The minimum compilers support all have alignas, and we don't use LLVM_ALIGNAS anywhere anymore. This also removes an MSVC diagnostic which, according to the comment above, isn't relevant anymore. Reviewers: rnk Subscribers: mgorny, jkorous, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65458 llvm-svn: 367383
-rw-r--r--clang-tools-extra/docs/doxygen.cfg.in2
-rw-r--r--clang/docs/doxygen.cfg.in2
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake8
-rw-r--r--llvm/docs/doxygen.cfg.in2
-rw-r--r--llvm/include/llvm/Support/Compiler.h12
-rw-r--r--llvm/unittests/Support/AlignOfTest.cpp8
6 files changed, 9 insertions, 25 deletions
diff --git a/clang-tools-extra/docs/doxygen.cfg.in b/clang-tools-extra/docs/doxygen.cfg.in
index fd77fc4717a..3554171ee11 100644
--- a/clang-tools-extra/docs/doxygen.cfg.in
+++ b/clang-tools-extra/docs/doxygen.cfg.in
@@ -1937,7 +1937,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED = LLVM_ALIGNAS(x)=
+PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
diff --git a/clang/docs/doxygen.cfg.in b/clang/docs/doxygen.cfg.in
index 9fe259ae74f..449552d99d4 100644
--- a/clang/docs/doxygen.cfg.in
+++ b/clang/docs/doxygen.cfg.in
@@ -1925,7 +1925,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED = LLVM_ALIGNAS(x)=
+PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index a243507791a..f9cb5d31021 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -530,14 +530,6 @@ if (MSVC)
# is fixed.
-wd4709 # Suppress comma operator within array index expression
- # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
- # support the 'aligned' attribute in the way that clang sources requires (for
- # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
- # avoid unwanted alignment warnings.
- # When we switch to requiring a version of MSVC that supports the 'alignas'
- # specifier (MSVC 2015?) this warning can be re-enabled.
- -wd4324 # Suppress 'structure was padded due to __declspec(align())'
-
# Promoted warnings.
-w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
diff --git a/llvm/docs/doxygen.cfg.in b/llvm/docs/doxygen.cfg.in
index a8e84a31276..fe74edc0866 100644
--- a/llvm/docs/doxygen.cfg.in
+++ b/llvm/docs/doxygen.cfg.in
@@ -1926,7 +1926,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED = LLVM_ALIGNAS(x)=
+PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 3f4f465f396..356ff6f0486 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -338,14 +338,6 @@
# define LLVM_ASSUME_ALIGNED(p, a) (p)
#endif
-/// \macro LLVM_ALIGNAS
-/// Used to specify a minimum alignment for a structure or variable.
-#if __GNUC__ && !__has_feature(cxx_alignas) && !LLVM_GNUC_PREREQ(4, 8, 1)
-# define LLVM_ALIGNAS(x) __attribute__((aligned(x)))
-#else
-# define LLVM_ALIGNAS(x) alignas(x)
-#endif
-
/// \macro LLVM_PACKED
/// Used to specify a packed structure.
/// LLVM_PACKED(
@@ -376,8 +368,8 @@
/// \macro LLVM_PTR_SIZE
/// A constant integer equivalent to the value of sizeof(void*).
-/// Generally used in combination with LLVM_ALIGNAS or when doing computation in
-/// the preprocessor.
+/// Generally used in combination with alignas or when doing computation in the
+/// preprocessor.
#ifdef __SIZEOF_POINTER__
# define LLVM_PTR_SIZE __SIZEOF_POINTER__
#elif defined(_WIN64)
diff --git a/llvm/unittests/Support/AlignOfTest.cpp b/llvm/unittests/Support/AlignOfTest.cpp
index 780af95e2ab..d8cabde6c72 100644
--- a/llvm/unittests/Support/AlignOfTest.cpp
+++ b/llvm/unittests/Support/AlignOfTest.cpp
@@ -38,10 +38,10 @@ namespace {
#endif
// Define some fixed alignment types to use in these tests.
-struct LLVM_ALIGNAS(1) A1 {};
-struct LLVM_ALIGNAS(2) A2 {};
-struct LLVM_ALIGNAS(4) A4 {};
-struct LLVM_ALIGNAS(8) A8 {};
+struct alignas(1) A1 {};
+struct alignas(2) A2 {};
+struct alignas(4) A4 {};
+struct alignas(8) A8 {};
struct S1 {};
struct S2 { char a; };
OpenPOWER on IntegriCloud