brintos

brintos / llvm-project-archived public Read only

0
0
Text · 901 B · 1636f08 Raw
24 lines · plain
1Instructions to reproduce2-------------------------3 4$ cat main.cpp5void __attribute__((optnone)) func2() {}6void __attribute__((noinline)) func1() { func2(); /* tail */ }7int __attribute__((disable_tail_calls)) main() {8  func1(); /* regular */9  return 0;10}11 12# Adding `-isysroot $(xcrun -sdk iphoneos.internal -show-sdk-path)` can fix13# linker warnings when building on macOS.14$ clang -arch arm64 main.cpp -o main.arm64.o -c -g -O215$ clang -arch arm64 main.arm64.o -o main.arm64 -g16 17RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_pc/main.arm64 -o %t.dSYM18RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_pc19 20RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_pc/main.arm64 -o %t.dSYM21RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_pc22 23CHECK: DW_AT_call_pc (0x0000000100007f94)24