| 1 |
Instructions to reproduce |
| 2 |
------------------------- |
| 3 |
|
| 4 |
$ cat main.cpp |
| 5 |
void __attribute__((optnone)) func2() {} |
| 6 |
void __attribute__((noinline)) func1() { func2(); /* tail */ } |
| 7 |
int __attribute__((disable_tail_calls)) main() { |
| 8 |
func1(); /* regular */ |
| 9 |
return 0; |
| 10 |
} |
| 11 |
|
| 12 |
# Adding `-isysroot $(xcrun -sdk iphoneos.internal -show-sdk-path)` can fix |
| 13 |
# linker warnings when building on macOS. |
| 14 |
$ clang -arch arm64 main.cpp -o main.arm64.o -c -g -O2 |
| 15 |
$ clang -arch arm64 main.arm64.o -o main.arm64 -g |
| 16 |
|
| 17 |
RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_pc/main.arm64 -o %t.dSYM |
| 18 |
RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_pc |
| 19 |
|
| 20 |
RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_pc/main.arm64 -o %t.dSYM |
| 21 |
RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_pc |
| 22 |
|
| 23 |
CHECK: DW_AT_call_pc (0x0000000100007f94) |