mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[IRGen][interop] do not add 'nocapture' to not bitwise takable types
The use of 'nocapture' for parameters and return values is incorrect for C++ types, as they can actually capture a pointer into its own value (e.g. std::string in libstdc++) rdar://115062687
This commit is contained in:
@@ -44,7 +44,7 @@ public class C<R> {
|
||||
|
||||
// SIL-LABEL: // C.f<A>(_:)
|
||||
// IR-LABEL: define {{.*}} @"$s1A1CC1fyyqd__lF"
|
||||
// IR-SAME: nocapture %[[ARG_0:.*]], {{.*}} %[[ARG_S:.*]],
|
||||
// IR-SAME: %[[ARG_0:.*]], {{.*}} %[[ARG_S:.*]],
|
||||
#sourceLocation(file: "f.swift", line: 1)
|
||||
public func f<S>(_ s: S) {
|
||||
// SIL: debug_value %0 : $*S, let, name "s", argno 1, expr op_deref, {{.*}} scope [[F]]
|
||||
|
||||
Reference in New Issue
Block a user