mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add a new parameter convention @in_cxx for non-trivial C++ classes that are passed indirectly and destructed by the caller (#73019)
This corresponds to the parameter-passing convention of the Itanium C++ ABI, in which the argument is passed indirectly and possibly modified, but not destroyed, by the callee. @in_cxx is handled the same way as @in in callers and @in_guaranteed in callees. OwnershipModelEliminator emits the call to destroy_addr that is needed to destroy the argument in the caller. rdar://122707697
This commit is contained in:
@@ -5186,6 +5186,7 @@ static uint8_t getRawStableParameterConvention(swift::ParameterConvention pc) {
|
||||
SIMPLE_CASE(ParameterConvention, Indirect_In_Guaranteed)
|
||||
SIMPLE_CASE(ParameterConvention, Indirect_Inout)
|
||||
SIMPLE_CASE(ParameterConvention, Indirect_InoutAliasable)
|
||||
SIMPLE_CASE(ParameterConvention, Indirect_In_CXX)
|
||||
SIMPLE_CASE(ParameterConvention, Direct_Owned)
|
||||
SIMPLE_CASE(ParameterConvention, Direct_Unowned)
|
||||
SIMPLE_CASE(ParameterConvention, Direct_Guaranteed)
|
||||
|
||||
Reference in New Issue
Block a user