[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 10:07:52 PDT 2024
================
@@ -1105,6 +1105,11 @@ bool MicrosoftCXXABI::hasMostDerivedReturn(GlobalDecl GD) const {
static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty,
CodeGenModule &CGM) {
+ // If the record is marked with the trivial_abi attribute, we don't
+ // have to conform to the standard MSVC ABI.
+ if (RD->hasAttr<TrivialABIAttr>())
----------------
rnk wrote:
Yes, I think I do want to block this on the recursive search. Even if it's ugly and we ultimately replace it with an explicitly tracked and type trait (`containsTrivialAbiSubobject`?), it reduces the number of externally visible ABI changes. I know we're saying this is ABI unstable already, but I still think fewer breaks is better.
https://github.com/llvm/llvm-project/pull/88857
More information about the cfe-commits
mailing list