mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Both the syntax and relative order of the LLVM `nocapture` parameter attribute changed upstream in 29441e4f5fa5f5c7709f7cf180815ba97f611297. To reduce conflicts with rebranch, adjust FileCheck patterns to expect both syntaxes and orders anywhere the presence of the attribute is not critical to the test. These changes are temporary and will be cleaned up once rebranch is merged into main.
29 lines
1.3 KiB
Swift
29 lines
1.3 KiB
Swift
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=default %s | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-cpu
|
|
|
|
// REQUIRES: OS=windows-msvc
|
|
|
|
import InRegSRet
|
|
|
|
final public class BasicBlock {
|
|
}
|
|
|
|
extension OptionalBridgedBasicBlock {
|
|
public var block: BasicBlock? { nil }
|
|
}
|
|
|
|
final public class Function {
|
|
public var bridged: BridgedFunction {
|
|
BridgedFunction()
|
|
}
|
|
|
|
public var firstBlock : BasicBlock? { bridged.getFirstBlock().block }
|
|
}
|
|
|
|
// Check that inreg on the sret isn't missing
|
|
|
|
// CHECK-x86_64: call void @"?getFirstBlock@BridgedFunction@@QEBA?AUOptionalBridgedBasicBlock@@XZ"(ptr {{.*}}, ptr noalias{{( nocapture)?}} sret(%TSo25OptionalBridgedBasicBlockV){{( captures\(none\))?}} {{.*}})
|
|
// CHECK-aarch64: call void @"?getFirstBlock@BridgedFunction@@QEBA?AUOptionalBridgedBasicBlock@@XZ"(ptr {{.*}}, ptr inreg noalias{{( nocapture)?}} sret(%TSo25OptionalBridgedBasicBlockV){{( captures\(none\))?}} {{.*}})
|
|
|
|
// CHECK-x86_64: define {{.*}} void @"?getFirstBlock@BridgedFunction@@QEBA?AUOptionalBridgedBasicBlock@@XZ"(ptr {{.*}} %{{.*}}, ptr {{.*}} sret(%struct.OptionalBridgedBasicBlock) {{.*}} %{{.*}})
|
|
// CHECK-aarch64: define {{.*}} void @"?getFirstBlock@BridgedFunction@@QEBA?AUOptionalBridgedBasicBlock@@XZ"(ptr {{.*}} %{{.*}}, ptr inreg {{.*}} sret(%struct.OptionalBridgedBasicBlock) {{.*}} %{{.*}})
|