AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.

There is code in the wild that relies on $0 not being expanded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201784 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2014-02-20 13:36:32 +00:00
parent 7934a2a9f1
commit 59f6c76703
3 changed files with 16 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-unknown-unknown %s > %t
// RUN: llvm-mc -triple i386-apple-darwin %s
.macro check_expr
.if ($0) != ($1)

View File

@@ -91,3 +91,15 @@ test8 1,2 3
// CHECK: .ascii "1,2,3"
test8 1 2, 3
.macro test10
.ascii "$20"
.endm
test10
// CHECK: .ascii "$20"
test10 42
// CHECK-ERRORS: 102:10: error: Wrong number of arguments
// CHECK-ERRORS-NEXT: test10 42
// CHECK-ERRORS-NEXT: ^