116 lines · plain
1# REQUIRES: aarch64, x862# RUN: split-file %s %t.dir && cd %t.dir3 4# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o test-x86_64.obj test-x86_64.s5# RUN: llvm-mc -triple=aarch64-windows-msvc -filetype=obj -o test-aarch64.obj test-aarch64.s6# RUN: llvm-mc -triple=arm64ec-windows-msvc -filetype=obj -o test-arm64ec.obj test-aarch64.s7 8# RUN: not lld-link -out:test-x86_64.exe test-x86_64.obj 2>&1 | FileCheck %s9# RUN: not lld-link -out:test-aarch64.exe test-aarch64.obj 2>&1 | FileCheck %s10# RUN: not lld-link -out:test-arm64ec.exe -machine:arm64ec test-arm64ec.obj 2>&1 | FileCheck %s11# RUN: not lld-link -out:test-arm64ec2.exe -machine:arm64ec test-x86_64.obj 2>&1 | FileCheck %s12 13# CHECK: error: undefined symbol: int __cdecl foo(void)14# CHECK-NEXT: >>> referenced by file1.cpp:115# CHECK-NEXT: >>> {{.*}}.obj:(main)16# CHECK-NEXT: >>> referenced by file1.cpp:217# CHECK-NEXT: >>> {{.*}}.obj:(main)18# CHECK-EMPTY:19# CHECK-NEXT: error: undefined symbol: int __cdecl bar(void)20# CHECK-NEXT: >>> referenced by file2.cpp:321# CHECK-NEXT: >>> {{.*}}.obj:(main)22# CHECK-NEXT: >>> referenced by file1.cpp:423# CHECK-NEXT: >>> {{.*}}.obj:(f1)24# CHECK-EMPTY:25# CHECK-NEXT: error: undefined symbol: int __cdecl baz(void)26# CHECK-NEXT: >>> referenced by file1.cpp:527# CHECK-NEXT: >>> {{.*}}.obj:(f2)28 29#--- test-x86_64.s30 .cv_file 1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 131 .cv_file 2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 132 33 .section .text,"xr",one_only,main34.globl main35main:36 .cv_func_id 037 .cv_loc 0 1 1 0 is_stmt 038 call "?foo@@YAHXZ"39 .cv_loc 0 1 2 040 call "?foo@@YAHXZ"41 .cv_loc 0 2 3 042 call "?bar@@YAHXZ"43.Lfunc_end0:44 45f1:46 .cv_func_id 147 .cv_loc 1 1 4 0 is_stmt 048 call "?bar@@YAHXZ"49.Lfunc_end1:50 51 .section .text,"xr",one_only,f252.globl f253f2:54 .cv_func_id 255 .cv_loc 2 1 5 0 is_stmt 056 call "?baz@@YAHXZ"57.Lfunc_end2:58 59 .section .debug$S,"dr",associative,main60 .long 461 .cv_linetable 0, main, .Lfunc_end062 .cv_linetable 1, f1, .Lfunc_end163 64 .section .debug$S,"dr",associative,f265 .long 466 .cv_linetable 2, f2, .Lfunc_end267 68 .section .debug$S,"dr"69 .long 470 .cv_filechecksums71 .cv_stringtable72 73#--- test-aarch64.s74 .cv_file 1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 175 .cv_file 2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 176 77 .section .text,"xr",one_only,main78.globl main79main:80 .cv_func_id 081 .cv_loc 0 1 1 0 is_stmt 082 bl "?foo@@YAHXZ"83 .cv_loc 0 1 2 084 bl "?foo@@YAHXZ"85 .cv_loc 0 2 3 086 b "?bar@@YAHXZ"87.Lfunc_end0:88 89f1:90 .cv_func_id 191 .cv_loc 1 1 4 0 is_stmt 092 bl "?bar@@YAHXZ"93.Lfunc_end1:94 95 .section .text,"xr",one_only,f296.globl f297f2:98 .cv_func_id 299 .cv_loc 2 1 5 0 is_stmt 0100 bl "?baz@@YAHXZ"101.Lfunc_end2:102 103 .section .debug$S,"dr",associative,main104 .long 4105 .cv_linetable 0, main, .Lfunc_end0106 .cv_linetable 1, f1, .Lfunc_end1107 108 .section .debug$S,"dr",associative,f2109 .long 4110 .cv_linetable 2, f2, .Lfunc_end2111 112 .section .debug$S,"dr"113 .long 4114 .cv_filechecksums115 .cv_stringtable116