2 # RUN: llvm-mc -triple=x86_64-windows-gnu -filetype=obj -o %t.o %s
3 # RUN: not lld-link /lldmingw /out:%t.exe %t.o /entry:entry 2>&1 | FileCheck %s
5 # CHECK: error: undefined symbol: bar()
6 # CHECK-NEXT: >>> referenced by /path/to/src{{[/\\]}}undef.cpp:17
7 # CHECK-NEXT: >>> {{.*}}.o:(entry)
9 # CHECK-NEXT: error: undefined symbol: foo()
10 # CHECK-NEXT: >>> referenced by /path/to/src{{[/\\]}}undef.cpp:7
11 # CHECK-NEXT: >>> {{.*}}.o:(A::afunc())
15 .file 1 "/path/to/src" "undef.cpp"
16 .globl entry # -- Begin function entry
19 .loc 1 14 0 # undef.cpp:14:0
24 .loc 1 16 4 prologue_end # undef.cpp:16:4
26 .loc 1 17 2 # undef.cpp:17:2
28 .loc 1 18 1 # undef.cpp:18:1
38 .section .text$_ZN1A5afuncEv,"xr",discard,_ZN1A5afuncEv
39 .globl _ZN1A5afuncEv # -- Begin function _ZN1A5afuncEv
41 _ZN1A5afuncEv
: # @_ZN1A5afuncEv
43 .loc 1 6 0 # undef.cpp:6:0
44 .loc 1 7 3 prologue_end # undef.cpp:7:3
45 jmp _Z3foov
# TAILCALL
49 .section .debug_abbrev,"dr"
51 .byte 1 # Abbreviation Code
52 .byte 17 # DW_TAG_compile_unit
53 .byte 1 # DW_CHILDREN_yes
54 .byte 37 # DW_AT_producer
55 .byte 37 # DW_FORM_strx1
56 .byte 19 # DW_AT_language
57 .byte 5 # DW_FORM_data2
59 .byte 37 # DW_FORM_strx1
60 .byte 16 # DW_AT_stmt_list
61 .byte 23 # DW_FORM_sec_offset
62 .byte 27 # DW_AT_comp_dir
63 .byte 37 # DW_FORM_strx1
64 .byte 17 # DW_AT_low_pc
65 .byte 1 # DW_FORM_addr
66 .byte 85 # DW_AT_ranges
67 .byte 23 # DW_FORM_sec_offset
71 .section .debug_info,"dr"
74 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
76 .short 4 # DWARF version number
77 .secrel32 .Lsection_abbrev # Offset Into Abbrev. Section
78 .byte 8 # Address Size (in bytes)
79 .byte 1 # Abbrev [1] 0xb:0xb0 DW_TAG_compile_unit
80 .byte 0 # DW_AT_producer
81 .short 4 # DW_AT_language
83 .secrel32 .Lline_table_start0 # DW_AT_stmt_list
84 .byte 0 # DW_AT_comp_dir
85 .quad 0 # DW_AT_low_pc
86 .secrel32 .Ldebug_ranges0 # DW_AT_ranges
87 .byte 0 # End Of Children Mark
89 .section .debug_ranges,"dr"
99 .section .debug_line,"dr"