mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
686c01854e
Previously, an unsupported/unknown assembler directive issued a warning. That's generally unsafe, and inconsistent with the behaviour of pretty much every system assembler. Now that the MC assemblers are mature enough to be the default on multiple targets, it's reasonable to issue errors for these. For target or platform directives that need to stay warnings, we should add explicit handlers for them in, e.g., ELFAsmParser.cpp, DarwinAsmParser.cpp, et. al., and issue the warning there. rdar://9246275 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155926 91177308-0d34-0410-b5e6-96231b3b80d8
40 lines
799 B
ArmAsm
40 lines
799 B
ArmAsm
// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s 2> %t.err | FileCheck %s
|
|
// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err
|
|
|
|
.macro .test0
|
|
.macrobody0
|
|
.endmacro
|
|
.macro .test1
|
|
.test0
|
|
.endmacro
|
|
|
|
.test1
|
|
// CHECK-ERRORS: <instantiation>:1:1: error: unknown directive
|
|
// CHECK-ERRORS-NEXT: macrobody0
|
|
// CHECK-ERRORS-NEXT: ^
|
|
// CHECK-ERRORS: <instantiation>:1:1: note: while in macro instantiation
|
|
// CHECK-ERRORS-NEXT: .test0
|
|
// CHECK-ERRORS-NEXT: ^
|
|
// CHECK-ERRORS: 11:1: note: while in macro instantiation
|
|
// CHECK-ERRORS-NEXT: .test1
|
|
// CHECK-ERRORS-NEXT: ^
|
|
|
|
.macro test2
|
|
.byte $0
|
|
.endmacro
|
|
test2 10
|
|
|
|
.macro test3
|
|
.globl "$0 $1 $2 $$3 $n"
|
|
.endmacro
|
|
|
|
// CHECK: .globl "1 23 $3 2"
|
|
test3 1,2 3
|
|
|
|
.macro test4
|
|
.globl "$0 -- $1"
|
|
.endmacro
|
|
|
|
// CHECK: .globl "ab)(,) -- (cd)"
|
|
test4 a b)(,),(cd)
|