Skip to content

Commit a22c8ef

Browse files
committed
[MC,test] Merge register-assignment-error.s into register-assignment.s and improve the test
To actually address my review comment in #75693
1 parent 2d0b55c commit a22c8ef

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

llvm/test/MC/X86/register-assignment-error.s

Lines changed: 0 additions & 8 deletions
This file was deleted.

llvm/test/MC/X86/register-assignment.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: llvm-mc -triple x86_64-unknown-unknown %s -o - | FileCheck %s
2+
// RUN: not llvm-mc -triple x86_64 --defsym ERR=1 %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
23

34
// CHECK-NOT: .set var_xdata
45
var_xdata = %rcx
@@ -25,3 +26,12 @@ xorq var_xdata, var_xdata
2526
.else
2627
.byte 2
2728
.endif
29+
30+
.ifdef ERR
31+
// ERR: [[#@LINE+1]]:5: error: expected absolute expression
32+
.if var_xdata == 1
33+
.endif
34+
// ERR: [[#@LINE+1]]:5: error: expected absolute expression
35+
.if 1 == var_xdata
36+
.endif
37+
.endif

0 commit comments

Comments
 (0)