mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In GenCall, fix the IR gen for C++ method calls as under MSVC as the calling conventions for free functions and C++ methods can be different. This also fixes the missing inreg (on sret arguments) issues on Windows ARM64. Also refactor to use CGFunctionInfo returnInfo isSretAfterThis to detect when to reorder the sret and the this arguments under MSVC. In ClagImporter, don't drop the return type for the compound assignment operators such as operator+= when the return value is a reference so that the CGFunctionInfo will be correctly indicate an indirect return for the compound assignment operators.
27 lines
380 B
Plaintext
27 lines
380 B
Plaintext
module Methods {
|
|
header "methods.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module AmbiguousMethods {
|
|
header "ambiguous_methods.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module UnsafeProjections {
|
|
header "unsafe-projections.h"
|
|
requires cplusplus
|
|
|
|
export *
|
|
}
|
|
|
|
module SRetWinARM64 {
|
|
header "sret-win-arm64.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module InRegSRet {
|
|
header "inreg-sret.h"
|
|
requires cplusplus
|
|
}
|