[clang] [clang] Return larger CXX records in memory (PR #120670)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 30 09:49:37 PST 2025


================
@@ -1334,6 +1334,16 @@ class X86_64ABIInfo : public ABIInfo {
     return T.isOSLinux() || T.isOSNetBSD();
   }
 
+  bool returnCXXRecordGreaterThan128InMem() const {
+    // Clang <= 20.0 did not do this.
+    if (getContext().getLangOpts().getClangABICompat() <=
+        LangOptions::ClangABI::Ver20)
+      return false;
+
+    const llvm::Triple &T = getTarget().getTriple();
+    return T.isOSLinux() || T.isOSNetBSD();
----------------
efriedma-quic wrote:

Please make this apply to all targets by default. Almost all targets will want to be consistent with the spec and gcc.  If you think you need to exclude some target for some reason, please list it explicitly.

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


More information about the cfe-commits mailing list