|
1 |
| -# REQUIRES: x86 |
2 |
| -# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s |
3 |
| -# RUN: not lld-link /out:%t.exe %t.obj 2>&1 | FileCheck %s |
| 1 | +# REQUIRES: aarch64, x86 |
| 2 | +# RUN: split-file %s %t.dir && cd %t.dir |
| 3 | + |
| 4 | +# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o test-x86_64.obj test-x86_64.s |
| 5 | +# RUN: llvm-mc -triple=aarch64-windows-msvc -filetype=obj -o test-aarch64.obj test-aarch64.s |
| 6 | +# RUN: llvm-mc -triple=arm64ec-windows-msvc -filetype=obj -o test-arm64ec.obj test-aarch64.s |
| 7 | + |
| 8 | +# RUN: not lld-link -out:test-x86_64.exe test-x86_64.obj 2>&1 | FileCheck %s |
| 9 | +# RUN: not lld-link -out:test-aarch64.exe test-aarch64.obj 2>&1 | FileCheck %s |
| 10 | +# RUN: not lld-link -out:test-arm64ec.exe -machine:arm64ec test-arm64ec.obj 2>&1 | FileCheck %s |
| 11 | +# RUN: not lld-link -out:test-arm64ec2.exe -machine:arm64ec test-x86_64.obj 2>&1 | FileCheck %s |
4 | 12 |
|
5 | 13 | # CHECK: error: undefined symbol: int __cdecl foo(void)
|
6 | 14 | # CHECK-NEXT: >>> referenced by file1.cpp:1
|
|
18 | 26 | # CHECK-NEXT: >>> referenced by file1.cpp:5
|
19 | 27 | # CHECK-NEXT: >>> {{.*}}.obj:(f2)
|
20 | 28 |
|
| 29 | +#--- test-x86_64.s |
21 | 30 | .cv_file 1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 1
|
22 | 31 | .cv_file 2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 1
|
23 | 32 |
|
|
60 | 69 | .long 4
|
61 | 70 | .cv_filechecksums
|
62 | 71 | .cv_stringtable
|
| 72 | + |
| 73 | +#--- test-aarch64.s |
| 74 | + .cv_file 1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 1 |
| 75 | + .cv_file 2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 1 |
| 76 | + |
| 77 | + .section .text,"xr",one_only,main |
| 78 | +.globl main |
| 79 | +main: |
| 80 | + .cv_func_id 0 |
| 81 | + .cv_loc 0 1 1 0 is_stmt 0 |
| 82 | + bl "?foo@@YAHXZ" |
| 83 | + .cv_loc 0 1 2 0 |
| 84 | + bl "?foo@@YAHXZ" |
| 85 | + .cv_loc 0 2 3 0 |
| 86 | + b "?bar@@YAHXZ" |
| 87 | +.Lfunc_end0: |
| 88 | + |
| 89 | +f1: |
| 90 | + .cv_func_id 1 |
| 91 | + .cv_loc 1 1 4 0 is_stmt 0 |
| 92 | + bl "?bar@@YAHXZ" |
| 93 | +.Lfunc_end1: |
| 94 | + |
| 95 | + .section .text,"xr",one_only,f2 |
| 96 | +.globl f2 |
| 97 | +f2: |
| 98 | + .cv_func_id 2 |
| 99 | + .cv_loc 2 1 5 0 is_stmt 0 |
| 100 | + bl "?baz@@YAHXZ" |
| 101 | +.Lfunc_end2: |
| 102 | + |
| 103 | + .section .debug$S,"dr",associative,main |
| 104 | + .long 4 |
| 105 | + .cv_linetable 0, main, .Lfunc_end0 |
| 106 | + .cv_linetable 1, f1, .Lfunc_end1 |
| 107 | + |
| 108 | + .section .debug$S,"dr",associative,f2 |
| 109 | + .long 4 |
| 110 | + .cv_linetable 2, f2, .Lfunc_end2 |
| 111 | + |
| 112 | + .section .debug$S,"dr" |
| 113 | + .long 4 |
| 114 | + .cv_filechecksums |
| 115 | + .cv_stringtable |
0 commit comments