llvm.org GIT mirror llvm / eb521fd
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367383 91177308-0d34-0410-b5e6-96231b3b80d8 JF Bastien 2 months ago
4 changed file(s) with 7 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
529529 # is fixed.
530530 -wd4709 # Suppress comma operator within array index expression
531531
532 # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
533 # support the 'aligned' attribute in the way that clang sources requires (for
534 # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
535 # avoid unwanted alignment warnings.
536 # When we switch to requiring a version of MSVC that supports the 'alignas'
537 # specifier (MSVC 2015?) this warning can be re-enabled.
538 -wd4324 # Suppress 'structure was padded due to __declspec(align())'
539
540532 # Promoted warnings.
541533 -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
542534
19251925 # recursively expanded use the := operator instead of the = operator.
19261926 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
19271927
1928 PREDEFINED = LLVM_ALIGNAS(x)=
1928 PREDEFINED =
19291929
19301930 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
19311931 # tag can be used to specify a list of macro names that should be expanded. The
337337 # define LLVM_ASSUME_ALIGNED(p, a) (p)
338338 #endif
339339
340 /// \macro LLVM_ALIGNAS
341 /// Used to specify a minimum alignment for a structure or variable.
342 #if __GNUC__ && !__has_feature(cxx_alignas) && !LLVM_GNUC_PREREQ(4, 8, 1)
343 # define LLVM_ALIGNAS(x) __attribute__((aligned(x)))
344 #else
345 # define LLVM_ALIGNAS(x) alignas(x)
346 #endif
347
348340 /// \macro LLVM_PACKED
349341 /// Used to specify a packed structure.
350342 /// LLVM_PACKED(
375367
376368 /// \macro LLVM_PTR_SIZE
377369 /// A constant integer equivalent to the value of sizeof(void*).
378 /// Generally used in combination with LLVM_ALIGNAS or when doing computation in
379 /// the preprocessor.
370 /// Generally used in combination with alignas or when doing computation in the
371 /// preprocessor.
380372 #ifdef __SIZEOF_POINTER__
381373 # define LLVM_PTR_SIZE __SIZEOF_POINTER__
382374 #elif defined(_WIN64)
3737 #endif
3838
3939 // Define some fixed alignment types to use in these tests.
40 struct LLVM_ALIGNAS(1) A1 {};
41 struct LLVM_ALIGNAS(2) A2 {};
42 struct LLVM_ALIGNAS(4) A4 {};
43 struct LLVM_ALIGNAS(8) A8 {};
40 struct alignas(1) A1 {};
41 struct alignas(2) A2 {};
42 struct alignas(4) A4 {};
43 struct alignas(8) A8 {};
4444
4545 struct S1 {};
4646 struct S2 { char a; };