xref: /aosp_15_r20/external/llvm/test/tools/dsymutil/X86/common-sym.test (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard WorkerRUN: llvm-dsymutil -oso-prepend-path %p/.. %p/../Inputs/common.macho.x86_64 -f -o - | llvm-dwarfdump -debug-dump=info - | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard WorkerThe test was compiled from a single source:
4*9880d681SAndroid Build Coastguard Worker$ cat common.c
5*9880d681SAndroid Build Coastguard Workerchar common[16];
6*9880d681SAndroid Build Coastguard Workerint main() { return 0;}
7*9880d681SAndroid Build Coastguard Workervoid bar() {}
8*9880d681SAndroid Build Coastguard Worker$ clang -g -c common.c -o common.macho.x86_64.o
9*9880d681SAndroid Build Coastguard Worker$ clang common.macho.x86_64.o -o common.macho.x86_64
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard WorkerCHECK:   DW_TAG_variable
12*9880d681SAndroid Build Coastguard WorkerCHECK:     DW_AT_name {{.*}} "common"
13*9880d681SAndroid Build Coastguard WorkerCHECK-NOT: {{NULL|DW_TAG}}
14*9880d681SAndroid Build Coastguard WorkerCHECK:     DW_AT_location {{.*}} (<0x09> 03 00 10 00 00 01 00 00 00 )
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard WorkerCHECK:   DW_TAG_subprogram
17*9880d681SAndroid Build Coastguard WorkerCHECK-NEXT:     DW_AT_low_pc{{.*}}(0x0000000100000f80)
18*9880d681SAndroid Build Coastguard WorkerCHECK-NOT: {{NULL|DW_TAG}}
19*9880d681SAndroid Build Coastguard WorkerCHECK:     DW_AT_name {{.*}} "main"
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard WorkerCHECK:   DW_TAG_subprogram
22*9880d681SAndroid Build Coastguard WorkerCHECK-NEXT:     DW_AT_low_pc{{.*}}(0x0000000100000f90)
23*9880d681SAndroid Build Coastguard WorkerCHECK-NOT: {{NULL|DW_TAG}}
24*9880d681SAndroid Build Coastguard WorkerCHECK:     DW_AT_name {{.*}} "bar"
25