Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / invalid / duplicate-symbol-debug.s
blob576ab75fadb777f8659f158119ae5650194a10e2
1 # REQUIRES: aarch64
2 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t-dup.o
4 # RUN: not %lld -dylib -arch arm64 -o /dev/null %t.o %t-dup.o 2>&1 | FileCheck %s -DFILE_1=%t.o -DFILE_2=%t-dup.o
6 # CHECK: error: duplicate symbol: _foo
7 # CHECK-NEXT: >>> defined in duplicate-symbol-debug.s:20
8 # CHECK-NEXT: >>> [[FILE_1]]
9 # CHECK-NEXT: >>> defined in duplicate-symbol-debug.s:20
10 # CHECK-NEXT: >>> [[FILE_2]]
12 ## Test case adapted from lld/test/ELF/Inputs/vs-diagnostics-duplicate2.s
14 .file 1 "" "duplicate-symbol-debug.s"
16 .text
18 .globl _foo
19 .loc 1 20
20 _foo:
21 nop
23 .section __DWARF,__debug_abbrev,regular,debug
24 .byte 1 ; Abbreviation code
25 .byte 17 ; DW_TAG_compile_unit
26 .byte 0 ; DW_CHILDREN_no
27 .byte 16 ; DW_AT_stmt_list
28 .byte 23 ; DW_FORM_sec_offset
29 .byte 0 ; EOM(1)
30 .byte 0 ; EOM(2)
31 .byte 0 ; EOM(3)
33 .section __DWARF,__debug_info,regular,debug
34 .long Lend0 - Lbegin0 ; Length of Unit
35 Lbegin0:
36 .short 4 ; DWARF version number
37 .long __debug_abbrev ; Offset Into Abbrev. Section
38 .byte 8 ; Address Size (in bytes)
39 .byte 1 ; Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
40 .long __debug_line ; DW_AT_stmt_list
41 Lend0:
42 .section __DWARF,__debug_line,regular,debug