diff options
author | Hugo Melder <service@hugomelder.com> | 2024-04-25 20:51:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 19:51:52 +0100 |
commit | 3dcd2cca7777b338d87deb1ca506df1376123667 (patch) | |
tree | 92f09b1289b7000b462b96b7f3c9db7ddb04d784 /clang/lib/CodeGen/CodeGenModule.h | |
parent | a8fd0d029dca7d17eee72d0445223c2fe1ee7758 (diff) | |
download | llvm-3dcd2cca7777b338d87deb1ca506df1376123667.zip llvm-3dcd2cca7777b338d87deb1ca506df1376123667.tar.gz llvm-3dcd2cca7777b338d87deb1ca506df1376123667.tar.bz2 |
Fix Objective-C++ Sret of non-trivial data types on Windows ARM64 (#88671)
Linked to https://github.com/gnustep/libobjc2/pull/289.
More information can be found in issue: #88273.
My solution involves creating a new message-send function for this
calling convention when targeting MSVC. Additional information is
available in the libobjc2 pull request.
I am unsure whether we should check for a runtime version where
objc_msgSend_stret2_np is guaranteed to be present or leave it as is,
considering it remains a critical bug. What are your thoughts about this
@davidchisnall?
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 1cc4477..be43a18 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1241,6 +1241,9 @@ public: /// Return true iff the given type uses 'sret' when used as a return type. bool ReturnTypeUsesSRet(const CGFunctionInfo &FI); + /// Return true iff the given type has `inreg` set. + bool ReturnTypeHasInReg(const CGFunctionInfo &FI); + /// Return true iff the given type uses an argument slot when 'sret' is used /// as a return type. bool ReturnSlotInterferesWithArgs(const CGFunctionInfo &FI); |