- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathasync_frame_pointer_all.swift
37 lines (27 loc) · 1.25 KB
/
async_frame_pointer_all.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// RUN: %target-swift-frontend -primary-file %s -emit-irgen -module-name async -disable-availability-checking -O -enable-async-frame-pointer-all | %FileCheck %s --check-prefix=ENABLED
// RUN: %target-swift-frontend -primary-file %s -emit-irgen -module-name async -disable-availability-checking -O -disable-async-frame-pointer-all | %FileCheck %s --check-prefix=DISABLED
// x86_64 seems to choose a different default for frame pointers.
// REQUIRES: CPU=arm64 || CPU=arm64e
@inline(never)
publicfunc plusOne(){
print("+1")
}
@inline(never)
publicfunc minusOne(){
print("-1")
}
// ENABLED: define{{.*}} swifttailcc void @"$s5async6calleeyyYaF"(ptr swiftasync %0) [[ATTRS:#[0-9]+]]
// ENABLED: define swifttailcc void @"$s5async6callerySiSbYaF"(ptr swiftasync %0, i1 %1) [[ATTRS]]
// ENABLED: attributes [[ATTRS]] = { {{.*}}"frame-pointer"="all"
// DISABLED: define{{.*}} swifttailcc void @"$s5async6calleeyyYaF"(ptr swiftasync %0) [[ATTRS:#[0-9]+]]
// DISABLED: define swifttailcc void @"$s5async6callerySiSbYaF"(ptr swiftasync %0, i1 %1) [[ATTRS]]
// DISABLED: attributes [[ATTRS]] = { {{.*}}"frame-pointer"="non-leaf"
publicfunc callee()async{}
publicfunc caller(_ b:Bool)async->Int{
plusOne()
if b {
awaitcallee()
}
minusOne()
return0
}