[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / tools / dsymutil / X86 / Inputs / tail-call.cpp
blob57e512e7009d97a290d13882ee01c8b70210277c
1 /*
2 * This file is used to test dsymutil support for call site entries with tail
3 * calls (DW_AT_call_pc).
5 * Instructions for regenerating binaries (on Darwin/x86_64):
7 * 1. Copy the source to a top-level directory to work around having absolute
8 * paths in the symtab's OSO entries.
10 * mkdir -p /Inputs/ && cp tail-call.c /Inputs && cd /Inputs
12 * 2. Compile with call site info enabled. -O2 is used to get tail call
13 * promotion.
15 * clang -g -O2 tail-call.c -c -o tail-call.macho.x86_64.o
16 * clang tail-call.macho.x86_64.o -o tail-call.macho.x86_64
18 * 3. Copy the binaries back into the repo's Inputs directory. You'll need
19 * -oso-prepend-path=%p to link.
22 volatile int x;
24 __attribute__((disable_tail_calls, noinline)) void func2() { x++; }
26 __attribute__((noinline)) void func1() { func2(); /* tail */ }
28 __attribute__((disable_tail_calls)) int main() { func1(); /* regular */ }