xref: /llvm-project/llvm/test/tools/dsymutil/X86/Inputs/call-site-entry.c (revision 5aeb6798f268f74dc8b0bf5bb75b9c57ec938548)
1 /*
2  * This file is used to test dsymutil support for call site entries
3  * (DW_TAG_call_site / DW_AT_call_return_pc).
4  *
5  * Instructions for regenerating binaries (on Darwin/x86_64):
6  *
7  * 1. Copy the source to a top-level directory to work around having absolute
8  *    paths in the symtab's OSO entries.
9  *
10  *    mkdir -p /Inputs/ && cp call-site-entry.c /Inputs && cd /Inputs
11  *
12  * 2. Compile with call site info enabled.
13  *
14  *    clang -g -O1 -Xclang -disable-llvm-passes call-site-entry.c -c -o call-site-entry.macho.x86_64.o
15  *    clang call-site-entry.macho.x86_64.o -o call-site-entry.macho.x86_64
16  *
17  * 3. Copy the binaries back into the repo's Inputs directory. You'll need
18  *    -oso-prepend-path=%p to link.
19  */
20 
f()21 __attribute__((optnone)) int f() {}
22 
main()23 int main() {
24   f();
25 }
26