Revert "[PowerPC][AIX] Limit attribute aligned to 4096."
authorSean Fertile <sd.fertile@gmail.com>
Fri, 6 Aug 2021 16:53:25 +0000 (12:53 -0400)
committerSean Fertile <sd.fertile@gmail.com>
Fri, 6 Aug 2021 17:54:50 +0000 (13:54 -0400)
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.

clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Sema/aix-attr-aligned-limit.c [deleted file]

index 5098c39..3b3e4a4 100644 (file)
@@ -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 (file)
index 3c9a0fa..0000000
+++ /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}}