[clang] dddd524 - Revert "[PowerPC][AIX] Limit attribute aligned to 4096."

Sean Fertile via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 6 10:56:20 PDT 2021


Author: Sean Fertile
Date: 2021-08-06T13:54:50-04:00
New Revision: dddd524bb8844b225d42c98d381d745d4fd549ea

URL: https://github.com/llvm/llvm-project/commit/dddd524bb8844b225d42c98d381d745d4fd549ea
DIFF: https://github.com/llvm/llvm-project/commit/dddd524bb8844b225d42c98d381d745d4fd549ea.diff

LOG: Revert "[PowerPC][AIX] Limit attribute aligned to 4096."

This reverts commit 5181be344adbf7ba7dffc73526893d4e7750d34c.

Break libcxx type_traits header which uses aligned storage with
alignments greater than 4096. Reverting untill we can fix the header.

Added: 
    

Modified: 
    clang/lib/Sema/SemaDeclAttr.cpp

Removed: 
    clang/test/Sema/aix-attr-aligned-limit.c


################################################################################
diff  --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 5098c3900aeb2..3b3e4a414c78c 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -4054,9 +4054,6 @@ void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
   unsigned MaximumAlignment = Sema::MaximumAlignment;
   if (Context.getTargetInfo().getTriple().isOSBinFormatCOFF())
     MaximumAlignment = std::min(MaximumAlignment, 8192u);
-  else if (Context.getTargetInfo().getTriple().isOSAIX())
-    MaximumAlignment = std::min(MaximumAlignment, 4096u);
-
   if (AlignVal > MaximumAlignment) {
     Diag(AttrLoc, diag::err_attribute_aligned_too_great)
         << MaximumAlignment << E->getSourceRange();

diff  --git a/clang/test/Sema/aix-attr-aligned-limit.c b/clang/test/Sema/aix-attr-aligned-limit.c
deleted file mode 100644
index 3c9a0facf9e54..0000000000000
--- a/clang/test/Sema/aix-attr-aligned-limit.c
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -triple powerpc-unknown-aix -fsyntax-only -verify %s
-// RUN: %clang_cc1 -triple powerpc64-unknown-aix -fsyntax-only -verify %s
-//
-int a __attribute__((aligned(8192))); // expected-error {{requested alignment must be 4096 bytes or smaller}}


        


More information about the cfe-commits mailing list