[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

Tobias Hieta via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 12:07:40 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>())
----------------
tru wrote:

Happy to add this. Can you point me to an example where we search recursively or give some pseudo code example and I should be able to take it from there pretty soon. 

https://github.com/llvm/llvm-project/pull/88857


More information about the cfe-commits mailing list