Skip to content

Commit 249acb8

Browse files
committed
MC: Update tests that check column information
Remove \t to make column checking easier. Replace {{[0-9]+}} with [[#]]. Remove some redundant column testing.
1 parent b38de6c commit 249acb8

File tree

7 files changed

+97
-97
lines changed

7 files changed

+97
-97
lines changed

llvm/test/MC/AArch64/ilp32-diagnostics.s

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,99 +6,99 @@
66
// ERROR: [[#@LINE-1]]:8: error: 8 byte PC relative data relocation is not supported in ILP32
77

88
.xword sym+16
9-
// ERROR: [[#@LINE-1]]:8: error: 8 byte absolute data relocation is not supported in ILP32
9+
// ERROR: [[#@LINE-1]]:[[#]]: error: 8 byte absolute data relocation is not supported in ILP32
1010

1111
.xword sym@AUTH(da,42)
1212
// ERROR: [[#@LINE-1]]:8: error: 8 byte absolute data relocation is not supported in ILP32
1313

1414
.xword sym@AUTH(da,42,addr)
15-
// ERROR: [[#@LINE-1]]:8: error: 8 byte absolute data relocation is not supported in ILP32
15+
// ERROR: [[#@LINE-1]]:[[#]]: error: 8 byte absolute data relocation is not supported in ILP32
1616

1717
movz x7, #:abs_g3:some_label
1818
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
1919
// ERROR: movz x7, #:abs_g3:some_label
2020

2121
movz x3, #:abs_g2:some_label
22-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
22+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
2323
// ERROR: movz x3, #:abs_g2:some_label
2424

2525
movz x19, #:abs_g2_s:some_label
26-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
26+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
2727
// ERROR: movz x19, #:abs_g2_s:some_label
2828

2929
movk x5, #:abs_g2_nc:some_label
30-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
30+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
3131
// ERROR: movk x5, #:abs_g2_nc:some_label
3232

3333
movz x19, #:abs_g1_s:some_label
34-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
34+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
3535
// ERROR: movz x19, #:abs_g1_s:some_label
3636

3737
movk x5, #:abs_g1_nc:some_label
38-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
38+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
3939
// ERROR: movk x5, #:abs_g1_nc:some_label
4040

4141
movz x3, #:dtprel_g2:var
42-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
42+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
4343
// ERROR: movz x3, #:dtprel_g2:var
4444

4545
movk x9, #:dtprel_g1_nc:var
46-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
46+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
4747
// ERROR: movk x9, #:dtprel_g1_nc:var
4848

4949
movz x3, #:tprel_g2:var
50-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
50+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
5151
// ERROR: movz x3, #:tprel_g2:var
5252

5353
movk x9, #:tprel_g1_nc:var
54-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
54+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
5555
// ERROR: movk x9, #:tprel_g1_nc:var
5656

5757
movz x15, #:gottprel_g1:var
58-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
58+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
5959
// ERROR: movz x15, #:gottprel_g1:var
6060

6161
movk x13, #:gottprel_g0_nc:var
62-
// ERROR: [[#@LINE-1]]:1: error: absolute MOV relocation is not supported in ILP32
62+
// ERROR: [[#@LINE-1]]:[[#]]: error: absolute MOV relocation is not supported in ILP32
6363
// ERROR: movk x13, #:gottprel_g0_nc:var
6464

6565
ldr x10, [x0, #:gottprel_lo12:var]
66-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
66+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
6767
// ERROR: ldr x10, [x0, #:gottprel_lo12:var]
6868

6969
ldr x24, [x23, #:got_lo12:sym]
70-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
70+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
7171

7272
ldr x24, [x23, #:got_auth_lo12:sym]
73-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
73+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
7474

7575
add x24, x23, #:got_auth_lo12:sym
76-
// ERROR: [[#@LINE-1]]:1: error: ADD AUTH relocation is not supported in ILP32
76+
// ERROR: [[#@LINE-1]]:[[#]]: error: ADD AUTH relocation is not supported in ILP32
7777

7878
ldr x24, [x23, :gottprel_lo12:sym]
79-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
79+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
8080

8181
ldr x10, [x0, #:gottprel_lo12:var]
82-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
82+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
8383
// ERROR: ldr x10, [x0, #:gottprel_lo12:var]
8484

8585
ldr x24, [x23, #:got_lo12:sym]
86-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
86+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
8787

8888
ldr x24, [x23, :gottprel_lo12:sym]
89-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store relocation is not supported in ILP32
89+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store relocation is not supported in ILP32
9090

9191
ldr x24, :got_auth:sym
9292
// ERROR: [[#@LINE-1]]:1: error: LDR AUTH relocation is not supported in ILP32
9393

9494
adr x24, :got_auth:sym
95-
// ERROR: [[#@LINE-1]]:1: error: ADR AUTH relocation is not supported in ILP32
95+
// ERROR: [[#@LINE-1]]:[[#]]: error: ADR AUTH relocation is not supported in ILP32
9696

9797
adrp x24, :tlsdesc_auth:sym
98-
// ERROR: [[#@LINE-1]]:1: error: ADRP AUTH relocation is not supported in ILP32
98+
// ERROR: [[#@LINE-1]]:[[#]]: error: ADRP AUTH relocation is not supported in ILP32
9999

100100
ldr x24, [x23, :tlsdesc_auth_lo12:sym]
101-
// ERROR: [[#@LINE-1]]:1: error: 64-bit load/store AUTH relocation is not supported in ILP32
101+
// ERROR: [[#@LINE-1]]:[[#]]: error: 64-bit load/store AUTH relocation is not supported in ILP32
102102

103103
add x24, x23, :tlsdesc_auth_lo12:sym
104-
// ERROR: [[#@LINE-1]]:1: error: ADD AUTH relocation is not supported in ILP32
104+
// ERROR: [[#@LINE-1]]:[[#]]: error: ADD AUTH relocation is not supported in ILP32

llvm/test/MC/ARM/lower-upper-errors-2.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// CHECK: [[@LINE+1]]:1: error: unsupported relocation
1212
adds r0, r0, #foo
1313

14-
// CHECK: [[@LINE+1]]:1: error: unsupported relocation
14+
// CHECK: [[@LINE+1]]:[[#]]: error: unsupported relocation
1515
add r9, r0, #foo
1616

1717
// CHECK: [[@LINE+1]]:1: error: expected relocatable expression

llvm/test/MC/ARM/thumb-branches.s

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,65 @@
77
// Thumb BL has range +- 4 Megabytes if CPU does not support Thumb2 or does not
88
// have v8-M baseline ops, it is +- 16 Megabytes otherwise.
99

10-
.code 16
11-
bl shortend
12-
.space 0x3fffff
10+
.code 16
11+
bl shortend
12+
.space 0x3fffff
1313
shortend:
1414
// CHECKSHORT-NOT: error:
15-
// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
16-
bl shortend2
17-
.space 0x400000
15+
// CHECKSHORT: [[@LINE+1]]:[[#]]: error: Relocation out of range
16+
bl shortend2
17+
.space 0x400000
1818
shortend2:
1919

20-
// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
21-
bl end
22-
.space 0xffffff
20+
// CHECKSHORT: [[@LINE+1]]:[[#]]: error: Relocation out of range
21+
bl end
22+
.space 0xffffff
2323
end:
24-
bl end2
25-
.space 0xffffff
26-
.global end2
24+
bl end2
25+
.space 0xffffff
26+
.global end2
2727
end2:
2828

29-
bl end3
30-
.space 0x1000000
31-
.global end3
29+
bl end3
30+
.space 0x1000000
31+
.global end3
3232
end3:
3333

3434
// CHECK-NOT: error:
3535
// CHECKSHORT-NOT: error:
36-
// CHECKSHORT: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range
37-
// CHECK: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
38-
bl end4
39-
.space 0x1000000
36+
// CHECKSHORT: [[@LINE+2]]:[[#]]: error: Relocation out of range
37+
// CHECK: [[@LINE+1]]:[[#]]: error: Relocation out of range
38+
bl end4
39+
.space 0x1000000
4040
end4:
4141

4242
shortstart1:
43-
.space 0x3ffffc
44-
bl shortstart1
43+
.space 0x3ffffc
44+
bl shortstart1
4545

4646
shortstart2:
47-
.space 0x400000
48-
// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
49-
bl shortstart2
47+
.space 0x400000
48+
// CHECKSHORT: [[@LINE+1]]:[[#]]: error: Relocation out of range
49+
bl shortstart2
5050

5151
start1:
52-
.space 0xfffffc
53-
// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
54-
bl start1
52+
.space 0xfffffc
53+
// CHECKSHORT: [[@LINE+1]]:[[#]]: error: Relocation out of range
54+
bl start1
5555

56-
.global start2
56+
.global start2
5757
start2:
58-
.space 0xfffffc
59-
bl start2
58+
.space 0xfffffc
59+
bl start2
6060

61-
.global start3
61+
.global start3
6262
start3:
63-
.space 0xfffffd
64-
bl start3
63+
.space 0xfffffd
64+
bl start3
6565

6666
// CHECK-NOT: error:
6767
start4:
68-
.space 0xfffffd
69-
// CHECK: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range
70-
// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
71-
bl start4
68+
.space 0xfffffd
69+
// CHECK: [[@LINE+2]]:[[#]]: error: Relocation out of range
70+
// CHECKSHORT: [[@LINE+1]]:[[#]]: error: Relocation out of range
71+
bl start4

llvm/test/MC/ARM/thumb2-branch-ranges.s

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ end3: bx lr
2626

2727
// branch to thumb function is resolved at assembly time
2828
// CHECK-NOT: error:
29-
// CHECK: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range
29+
// CHECK: [[@LINE+2]]:[[#]]: error: Relocation out of range
3030
// CHECK-LABEL: b.w end4
3131
b.w end4
3232
.space 0x1000000
@@ -47,7 +47,7 @@ end6: bx lr
4747

4848
// conditional branch to thumb function resolved at assembly time
4949
// CHECK-NOT: error:
50-
// CHECK: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range
50+
// CHECK: [[@LINE+2]]:[[#]]: error: Relocation out of range
5151
// CHECK-LABEL: beq.w end7
5252
beq.w end7
5353
.space 0x100000
@@ -70,7 +70,7 @@ start3:
7070
.space 0x1000000
7171
// branch to thumb function resolved at assembly time
7272
// CHECK-NOT: error:
73-
// CHECK: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range
73+
// CHECK: [[@LINE+2]]:[[#]]: error: Relocation out of range
7474
// CHECK-LABEL: b.w start3
7575
b.w start3
7676

@@ -91,12 +91,12 @@ start6:
9191
.space 0x100000
9292
// branch to thumb function resolved at assembly time
9393
// CHECK-NOT: error:
94-
// CHECK: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range
94+
// CHECK: [[@LINE+2]]:[[#]]: error: Relocation out of range
9595
// CHECK-LABEL: beq.w start6
9696
beq.w start6
9797

9898
start7:
9999
// branch to thumb function resolved at assembly time
100-
// CHECK: [[#@LINE+1]]:{{[0-9]}}: error: Relocation out of range
100+
// CHECK: [[#@LINE+1]]:[[#]]: error: Relocation out of range
101101
b.w start8 - start7 + 0x1000000
102102
start8:

llvm/test/MC/ELF/relocation-alias.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# RUN: llvm-objdump --no-print-imm-hex -dr %t | FileCheck %s
33
# RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYM
44

5-
# RUN: not llvm-mc -filetype=obj -triple x86_64 --defsym ERR0=1 %s 2>&1 | FileCheck %s --check-prefix=ERR0 --implicit-check-not=error:
6-
# RUN: not llvm-mc -filetype=obj -triple x86_64 --defsym ERR=1 %s 2>&1 | FileCheck %s --check-prefix=ERR
5+
# RUN: not llvm-mc -filetype=obj -triple x86_64 --defsym ERR0=1 %s -o %t 2>&1 | FileCheck %s --check-prefix=ERR0 --implicit-check-not=error:
6+
# RUN: not llvm-mc -filetype=obj -triple x86_64 --defsym ERR=1 %s -o %t 2>&1 | FileCheck %s --check-prefix=ERR
77

88
## If a fixup symbol is equated to an undefined symbol, convert the fixup
99
## to be against the target symbol, even if there is a variant (@PLT).
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# RUN: not llvm-mc -triple mips-unknown-linux %s -show-encoding \
22
# RUN: -target-abi=o32 -filetype=obj 2>&1 | FileCheck %s
3-
.text
4-
nop
5-
.reloc foo, R_MIPS_32, .text # CHECK: :[[@LINE]]:2: error: unresolved relocation offset
6-
nop
7-
nop
8-
.reloc bar, R_MIPS_32, .text # CHECK: :[[@LINE]]:2: error: unresolved relocation offset
9-
nop
3+
.text
4+
nop
5+
.reloc foo, R_MIPS_32, .text # CHECK: :[[@LINE]]:1: error: unresolved relocation offset
6+
nop
7+
nop
8+
.reloc bar, R_MIPS_32, .text # CHECK: :[[@LINE]]:1: error: unresolved relocation offset
9+
nop

llvm/test/MC/RISCV/Relocations/expr-err.s

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
.Ltmp1:
44
.quad tls
55

6-
lui a0, %hi(tls+0-.Ltmp1)
7-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
8-
lw a0, %lo(tls+0-.Ltmp1)(t0)
9-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
10-
lui a0, %tprel_hi(tls+0-.Ltmp1)
11-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
12-
add a0, a0, tp, %tprel_add(tls+0-.Ltmp1)
13-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
14-
addi a0, a0, %tprel_lo(tls+0-.Ltmp1)
15-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
16-
auipc a0, %tls_ie_pcrel_hi(tls+0-.Ltmp1)
17-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
18-
auipc a0, %tls_gd_pcrel_hi(tls+0-.Ltmp1)
19-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
20-
auipc a0, %pcrel_hi(tls-.Ltmp1)
21-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
22-
auipc a0, %got_pcrel_hi(tls-.Ltmp1)
23-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
24-
addi a0, a0, %pcrel_lo(tls-.Ltmp1)
25-
# CHECK: :[[#@LINE-1]]:2: error: expected relocatable expression
6+
lui a0, %hi(tls+0-.Ltmp1)
7+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
8+
lw a0, %lo(tls+0-.Ltmp1)(t0)
9+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
10+
lui a0, %tprel_hi(tls+0-.Ltmp1)
11+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
12+
add a0, a0, tp, %tprel_add(tls+0-.Ltmp1)
13+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
14+
addi a0, a0, %tprel_lo(tls+0-.Ltmp1)
15+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
16+
auipc a0, %tls_ie_pcrel_hi(tls+0-.Ltmp1)
17+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
18+
auipc a0, %tls_gd_pcrel_hi(tls+0-.Ltmp1)
19+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
20+
auipc a0, %pcrel_hi(tls-.Ltmp1)
21+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
22+
auipc a0, %got_pcrel_hi(tls-.Ltmp1)
23+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
24+
addi a0, a0, %pcrel_lo(tls-.Ltmp1)
25+
# CHECK: :[[#@LINE-1]]:1: error: expected relocatable expression
2626

2727
# tail tls+32
2828
# tail tls-tls

0 commit comments

Comments
 (0)