mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
221514efe9
the body does not use them and it appears the body has positional parameters. This can cause unexpected results as in the added test case. As the darwin version of gas(1) which only supported positional parameters, happened to ignore the named parameters. Now that we want to support both styles of macros we issue a warning in this specific case. rdar://12861644 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173199 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
497 B
ArmAsm
15 lines
497 B
ArmAsm
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s 2> %t.err > %t
|
|
// RUN: FileCheck --check-prefix=CHECK-OUTPUT < %t %s
|
|
// RUN: FileCheck --check-prefix=CHECK-ERROR < %t.err %s
|
|
|
|
.macro test_macro reg1, reg2
|
|
mov $1, %eax
|
|
mov $2, %eax
|
|
.endmacro
|
|
test_macro %ebx, %ecx
|
|
|
|
// CHECK-ERROR: 5:1: warning: macro defined with named parameters which are not used in macro body, possible positional parameter found in body which will have no effect
|
|
|
|
// CHECK-OUTPUT: movl $1, %eax
|
|
// CHECK-OUTPUT: movl $2, %eax
|