MaskRay wrote:
The supposed doc fix (for `doc-clang-html`?) #67195 caused `error: Record
`NoUniqueAddress', field `Documentation' exists but does not have a list
value`. I have reverted #67195.
https://github.com/llvm/llvm-project/pull/65675
___
cfe-
https://github.com/amykhuang closed
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
amykhuang wrote:
Are there any other comments here? I think I've addressed all the existing ones.
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang updated
https://github.com/llvm/llvm-project/pull/65675
>From 481337fde54dc4d7f68a604952a963c99913675d Mon Sep 17 00:00:00 2001
From: Amy Huang
Date: Fri, 21 Jul 2023 16:30:30 -0700
Subject: [PATCH 1/6] Implement [[msvc::no_unique_address]]
This attribute should ma
@@ -3317,6 +3353,7 @@ ASTContext::getASTRecordLayout(const RecordDecl *D) const
{
Builder.EndsWithZeroSizedObject, Builder.LeadsWithZeroSizedBase,
Builder.Bases, Builder.VBases);
} else {
+ MicrosoftRecordLayoutBuilder Builder(*this, /*EmptySubobje
@@ -3317,6 +3353,7 @@ ASTContext::getASTRecordLayout(const RecordDecl *D) const
{
Builder.EndsWithZeroSizedObject, Builder.LeadsWithZeroSizedBase,
Builder.Bases, Builder.VBases);
} else {
+ MicrosoftRecordLayoutBuilder Builder(*this, /*EmptySubobje
amykhuang wrote:
> > We should consider whether we want to support `__msvc_no_unique_address__`
> > or similar as an alternative spelling #61196
>
> I think `[[__msvc__::__no_unique_address__]]` would be better. This is how
> the clang and gnu attributes are handled too. I'm also fine with han
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -55,7 +55,7 @@ CXX11(unlikely)
// CHECK: likely: 201803L
// CHECK: maybe_unused: 201603L
// ITANIUM: no_unique_address: 201803L
-// WINDOWS: no_unique_address: 0
+// WINDOWS: no_unique_address: 201803L
amykhuang wrote:
Tried this and the inheritance part w
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -55,7 +55,7 @@ CXX11(unlikely)
// CHECK: likely: 201803L
// CHECK: maybe_unused: 201603L
// ITANIUM: no_unique_address: 201803L
-// WINDOWS: no_unique_address: 0
+// WINDOWS: no_unique_address: 201803L
cor3ntin wrote:
don't we expect `__has_cpp_attribute(n
@@ -8368,6 +8368,20 @@ static void handleNoMergeAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
D->addAttr(NoMergeAttr::Create(S.Context, AL));
}
+static void handleNoUniqueAddressAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ NoUniqueAddressAttr TmpAttr(S.Context, AL);
+
https://github.com/cor3ntin commented:
There are some whitespace-only that should be reverted + 1 small nitpick.
And I have a question about `__has_cpp_attribute`
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@
@@ -743,6 +743,7 @@ void CGRecordLowering::calculateZeroInit() {
void CGRecordLowering::clipTailPadding() {
std::vector::iterator Prior = Members.begin();
CharUnits Tail = getSize(Prior->Data);
+
mstorsjo wrote:
Nit: The total PR sums up to adding a spurio
@@ -2866,8 +2871,10 @@
MicrosoftRecordLayoutBuilder::layoutNonVirtualBases(const CXXRecordDecl *RD) {
for (const CXXBaseSpecifier &Base : RD->bases()) {
if (Base.isVirtual())
continue;
+
const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl();
https://github.com/amykhuang updated
https://github.com/llvm/llvm-project/pull/65675:
>From 923a43cd6386f6e57023fd8928eed0dc0ab04d57 Mon Sep 17 00:00:00 2001
From: Amy Huang
Date: Fri, 21 Jul 2023 16:30:30 -0700
Subject: [PATCH 1/3] Implement [[msvc::no_unique_address]]
This attribute should m
https://github.com/amykhuang updated
https://github.com/llvm/llvm-project/pull/65675:
>From 923a43cd6386f6e57023fd8928eed0dc0ab04d57 Mon Sep 17 00:00:00 2001
From: Amy Huang
Date: Fri, 21 Jul 2023 16:30:30 -0700
Subject: [PATCH 1/3] Implement [[msvc::no_unique_address]]
This attribute should m
https://github.com/amykhuang updated
https://github.com/llvm/llvm-project/pull/65675:
>From 923a43cd6386f6e57023fd8928eed0dc0ab04d57 Mon Sep 17 00:00:00 2001
From: Amy Huang
Date: Fri, 21 Jul 2023 16:30:30 -0700
Subject: [PATCH 1/3] Implement [[msvc::no_unique_address]]
This attribute should m
@@ -4505,6 +4505,14 @@ bool FieldDecl::isZeroSize(const ASTContext &Ctx) const {
if (!CXXRD->isEmpty())
return false;
+ // MS ABI: nonzero if class type with class type fields
amykhuang wrote:
As far as I can tell the cases above still apply to MSVC so
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2999,17 +3139,17 @@ void MicrosoftRecordLayoutBuilder::layoutBitField(const
FieldDecl *FD) {
auto NewSize = Context.toCharUnitsFromBits(
llvm::alignDown(FieldBitOffset, Context.toBits(Info.Alignment)) +
Context.toBits(Info.Size));
-Size = std::max(S
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> When you say you want a second opinion on CodeGen changes, do you mean
> RecordLayoutBuilder.cpp? I don't see any non-whitespace changes to
> clang/lib/CodeGen/ .
Sorry for the confusion, yes, I was mostly worried about
RecordLayoutBuilder.cpp and whether you spotted any
llvmbot wrote:
@llvm/pr-subscribers-clang
Changes
This implements the [[msvc::no_unique_address]] attribute.
There is not ABI compatibility in this patch because the attribute is
relatively new and there's still some uncertainty in the MSVC version.
Bug: https://github.com/llvm/llvm-project
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang updated
https://github.com/llvm/llvm-project/pull/65675:
>From 923a43cd6386f6e57023fd8928eed0dc0ab04d57 Mon Sep 17 00:00:00 2001
From: Amy Huang
Date: Fri, 21 Jul 2023 16:30:30 -0700
Subject: [PATCH 1/2] Implement [[msvc::no_unique_address]]
This attribute should m
@@ -4505,6 +4505,14 @@ bool FieldDecl::isZeroSize(const ASTContext &Ctx) const {
if (!CXXRD->isEmpty())
return false;
+ // MS ABI: nonzero if class type with class type fields
erichkeane wrote:
Does any differentiation need to be made between the spell
@@ -1798,11 +1798,13 @@ def ArmMveStrictPolymorphism : TypeAttr,
TargetSpecificAttr {
let Documentation = [ArmMveStrictPolymorphismDocs];
}
-def NoUniqueAddress : InheritableAttr, TargetSpecificAttr
{
- let Spellings = [CXX11<"", "no_unique_address", 201803>];
+def NoUniq
https://github.com/erichkeane commented:
The `RecordLayoutBuilder` is not something I have any knowledge about, but I
shared two comments.
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2937,14 +2964,97 @@ void MicrosoftRecordLayoutBuilder::layoutNonVirtualBase(
BaseOffset = CharUnits::Zero();
} else {
// Otherwise, lay the base out at the end of the MDC.
- BaseOffset = Size = Size.alignTo(Info.Alignment);
+ BaseOffset = DataSize
efriedma-quic wrote:
When you say you want a second opinion on CodeGen changes, do you mean
RecordLayoutBuilder.cpp? I don't see any non-whitespace changes to
clang/lib/CodeGen/ .
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits maili
https://github.com/AaronBallman commented:
Added @erichkeane as attributes code owner, and @efriedma-quic and @rjmccall as
codegen code owners.
The attributes changes look good to me. The codegen changes seem reasonable,
but are a bit outside my area of expertise for me to feel comfortable sig
https://github.com/AaronBallman review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjdb requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2999,17 +3139,17 @@ void MicrosoftRecordLayoutBuilder::layoutBitField(const
FieldDecl *FD) {
auto NewSize = Context.toCharUnitsFromBits(
llvm::alignDown(FieldBitOffset, Context.toBits(Info.Alignment)) +
Context.toBits(Info.Size));
-Size = std::max(S
https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rnk review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2937,14 +2964,97 @@ void MicrosoftRecordLayoutBuilder::layoutNonVirtualBase(
BaseOffset = CharUnits::Zero();
} else {
// Otherwise, lay the base out at the end of the MDC.
- BaseOffset = Size = Size.alignTo(Info.Alignment);
+ BaseOffset = DataSize
philnik777 wrote:
> We should consider whether we want to support `__msvc_no_unique_address__` or
> similar as an alternative spelling #61196
I think `[[__msvc__::__no_unique_address__]]` would be better. This is how the
clang and gnu attributes are handled too.
https://github.com/llvm/llvm-p
cor3ntin wrote:
We should consider whether we want to support __msvc_no_unique_address__ or
similar
https://github.com/llvm/llvm-project/issues/61196
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.
@@ -3055,7 +3195,7 @@ void MicrosoftRecordLayoutBuilder::injectVBPtr(const
CXXRecordDecl *RD) {
// It is possible that there were no fields or bases located after vbptr,
// so the size was not adjusted before.
if (Size < FieldStart)
- Size = FieldStart;
+
https://github.com/amykhuang resolved
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2937,14 +2964,97 @@ void MicrosoftRecordLayoutBuilder::layoutNonVirtualBase(
BaseOffset = CharUnits::Zero();
} else {
// Otherwise, lay the base out at the end of the MDC.
- BaseOffset = Size = Size.alignTo(Info.Alignment);
+ BaseOffset = DataSize
@@ -3055,7 +3195,7 @@ void MicrosoftRecordLayoutBuilder::injectVBPtr(const
CXXRecordDecl *RD) {
// It is possible that there were no fields or bases located after vbptr,
// so the size was not adjusted before.
if (Size < FieldStart)
- Size = FieldStart;
+
@@ -4505,6 +4505,14 @@ bool FieldDecl::isZeroSize(const ASTContext &Ctx) const {
if (!CXXRD->isEmpty())
return false;
+ // MS ABI: nonzero if class type with class type fields
+ if (Ctx.getTargetInfo().getCXXABI().isMicrosoft() &&
+ llvm::any_of(CXXRD->fields(), [
https://github.com/amykhuang edited
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/github-actions[bot] labeled
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/github-actions[bot] labeled
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang labeled
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang review_requested
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amykhuang created
https://github.com/llvm/llvm-project/pull/65675:
This implements the [[msvc::no_unique_address]] attribute.
There is not ABI compatibility in this patch because the attribute is
relatively new and there's still some uncertainty in the MSVC version.
Bug: ht
https://github.com/amykhuang labeled
https://github.com/llvm/llvm-project/pull/65675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
64 matches
Mail list logo