File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11
11
// symbolication. Note that `llvm-symbolizer` does not demangle Swift symbol
12
12
// names, so we use `swift demangle`.
13
13
14
+ @inline ( never)
14
15
func foo( ) {
15
16
let x = UnsafeMutablePointer< Int> . allocate( capacity: 1 )
16
17
x. deallocate ( )
17
18
print ( x. pointee)
18
19
}
19
20
21
+ @inline ( never)
20
22
func bar( ) {
21
23
foo ( )
24
+ print ( " Prevent tail call optimization " )
22
25
}
23
26
24
27
bar ( )
25
28
26
-
27
29
// Out-of-process
28
- // OOP: #0 0x{{[0-9a-f]+}} in main.foo() -> () {{.*}}symbolication-linux.swift:[[@LINE-11 ]]
30
+ // OOP: #0 0x{{[0-9a-f]+}} in main.foo() -> () {{.*}}symbolication-linux.swift:[[@LINE-12 ]]
29
31
// OOP-NEXT: #1 0x{{[0-9a-f]+}} in main.bar() -> () {{.*}}symbolication-linux.swift:[[@LINE-8]]
30
- // OOP-NEXT: #2 0x{{[0-9a-f]+}} in main {{.*}}symbolication-linux.swift:[[@LINE-6 ]]
32
+ // OOP-NEXT: #2 0x{{[0-9a-f]+}} in main {{.*}}symbolication-linux.swift:[[@LINE-5 ]]
31
33
32
34
// In-process
33
35
// IP: #0 0x{{[0-9a-f]+}} in main.foo() -> ()+0x
Original file line number Diff line number Diff line change 9
9
// both out-of-process (via `atos`) and when falling back to in-process
10
10
// symbolication. Note that `atos` also demangles Swift symbol names.
11
11
12
+ @inline ( never)
12
13
func foo( ) {
13
14
let x = UnsafeMutablePointer< Int> . allocate( capacity: 1 )
14
15
x. deallocate ( )
15
16
print ( x. pointee)
16
17
}
17
18
19
+ @inline ( never)
18
20
func bar( ) {
19
21
foo ( )
22
+ print ( " Prevent tail call optimization " )
20
23
}
21
24
22
25
bar ( )
23
26
24
-
25
27
// Out-of-process
26
- // OOP: #0 0x{{[0-9a-f]+}} in foo() symbolication.swift:[[@LINE-11 ]]
28
+ // OOP: #0 0x{{[0-9a-f]+}} in foo() symbolication.swift:[[@LINE-12 ]]
27
29
// OOP-NEXT: #1 0x{{[0-9a-f]+}} in bar() symbolication.swift:[[@LINE-8]]
28
- // OOP-NEXT: #2 0x{{[0-9a-f]+}} in main symbolication.swift:[[@LINE-6 ]]
30
+ // OOP-NEXT: #2 0x{{[0-9a-f]+}} in main symbolication.swift:[[@LINE-5 ]]
29
31
30
32
// In-process
31
33
// IP: #0 0x{{[0-9a-f]+}} in main.foo() -> ()+0x
You can’t perform that action at this time.
0 commit comments