diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-04-16 21:18:49 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-04-16 21:18:49 +0000 |
commit | 68f89a61587e8d482347cf892c2670a869a1ad61 (patch) | |
tree | ca95dcba7483a48c62b08caf66cdacb611271833 /test | |
parent | b8768dc32df0bf3edfa2777cdef57bb066e54344 (diff) | |
download | external_llvm-68f89a61587e8d482347cf892c2670a869a1ad61.zip external_llvm-68f89a61587e8d482347cf892c2670a869a1ad61.tar.gz external_llvm-68f89a61587e8d482347cf892c2670a869a1ad61.tar.bz2 |
MC assembly parser handling for trailing comma in macro instantiation.
A trailing comma means no argument at all (i.e., as if the comma were not
present), not an empty argument to the invokee.
rdar://11252521
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/AsmParser/macro-args.s | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/MC/AsmParser/macro-args.s b/test/MC/AsmParser/macro-args.s index 4b87899..13b197a 100644 --- a/test/MC/AsmParser/macro-args.s +++ b/test/MC/AsmParser/macro-args.s @@ -18,3 +18,27 @@ bar // CHECK: .long 3 // CHECK: .long 0 + + +.macro top + middle _$0, $1 +.endm +.macro middle + $0: + .if $n > 1 + bottom $1 + .endif +.endm +.macro bottom + .set fred, $0 +.endm + +.text + +top foo +top bar, 42 + +// CHECK: _foo: +// CHECK-NOT: fred +// CHECK: _bar +// CHECK-NEXT: fred = 42 |