30 lines · plain
1Test binaries created with the following commands:2 3$ cat call.c4__attribute__((noinline, noreturn)) void foo() {5 asm volatile("" ::: "memory");6 __builtin_unreachable();7}8__attribute__((noinline)) void bar() {9 asm volatile("nop" :::);10 foo();11}12 13int main() { bar(); }14 15$ clang -g call.c -fomit-frame-pointer -c -Os -o call.o16$ clang -g call.o -o call17 18The test requires the return PC to match a relocation (in this case the19DW_AT_high_pc of main). Without this change the value would get relocated20twice.21 22RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_return_pc/call -o %t.dSYM23RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_return_pc24 25RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_return_pc/call -o %t.dSYM26RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_return_pc27 28CHECK: DW_AT_call_return_pc (0x0000000100000f72)29CHECK: DW_AT_call_return_pc (0x0000000100000f78)30