1 RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/common/common.x86_64 -f -o - | llvm-dwarfdump -debug-info - | FileCheck %s
2 RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/common/common.x86_64 -dump-debug-map | FileCheck %s --check-prefix DEBUGMAP
4 RUN: dsymutil --linker llvm -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/common/common.x86_64 -f -o - | llvm-dwarfdump -debug-info - | FileCheck %s
5 RUN: dsymutil --linker llvm -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/common/common.x86_64 -dump-debug-map | FileCheck %s --check-prefix DEBUGMAP
7 The test was compiled from two source files:
8 $ cd /private/tmp/common
19 $ clang -fcommon -g -c common1.c -o common1.o
20 $ clang -fcommon -g -c common2.c -o common2.o
21 $ clang -fcommon -g common1.o common2.o -o common.x86_64
23 CHECK: DW_TAG_compile_unit
24 CHECK: DW_TAG_variable
25 CHECK-NOT: {{NULL|DW_TAG}}
26 CHECK: DW_AT_name{{.*}}"i"
27 CHECK-NOT: {{NULL|DW_TAG}}
28 CHECK: DW_AT_location{{.*}}DW_OP_addr 0x100001000)
30 CHECK: DW_TAG_compile_unit
31 CHECK: DW_TAG_variable
32 CHECK-NOT: {{NULL|DW_TAG}}
33 CHECK: DW_AT_name{{.*}}"i"
34 CHECK-NOT: {{NULL|DW_TAG}}
35 CHECK: DW_AT_location{{.*}}DW_OP_addr 0x100001000)
37 DEBUGMAP: filename:{{.*}}common1.o
39 DEBUGMAP: sym: _i, binAddr: 0x100001000, size: 0x0
40 DEBUGMAP: filename:{{.*}}common2.o
42 DEBUGMAP: sym: _i, binAddr: 0x100001000, size: 0x0