diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-20 13:36:32 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-20 13:36:32 +0000 |
commit | 59f6c76703a5a85b53a6192f7c28b85fe69ab07e (patch) | |
tree | 752f8a401bdc9e5b196d95f4861802510ab937e5 /test | |
parent | 7934a2a9f1d8d8dc220f5b25a303a770306d51d1 (diff) | |
download | llvm-59f6c76703a5a85b53a6192f7c28b85fe69ab07e.tar.gz llvm-59f6c76703a5a85b53a6192f7c28b85fe69ab07e.tar.bz2 llvm-59f6c76703a5a85b53a6192f7c28b85fe69ab07e.tar.xz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/AsmParser/exprs.s | 2 | ||||
-rw-r--r-- | test/MC/AsmParser/macros-gas.s | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/test/MC/AsmParser/exprs.s b/test/MC/AsmParser/exprs.s index a7e10020b6..c5fc9b594a 100644 --- a/test/MC/AsmParser/exprs.s +++ b/test/MC/AsmParser/exprs.s @@ -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) diff --git a/test/MC/AsmParser/macros-gas.s b/test/MC/AsmParser/macros-gas.s index 6c75363b5e..d907a2517f 100644 --- a/test/MC/AsmParser/macros-gas.s +++ b/test/MC/AsmParser/macros-gas.s @@ -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: ^ |