diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-07-30 22:44:17 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-07-30 22:44:17 +0000 |
commit | 9714644a38213d059f3ddced08cfc119ca8a0ab7 (patch) | |
tree | 8c2ae1939ffac03ce89d84f8da72415a1ad4a2e2 /test/MC | |
parent | ba1f580f338e12c47a600050f7a77fae579acf93 (diff) | |
download | external_llvm-9714644a38213d059f3ddced08cfc119ca8a0ab7.zip external_llvm-9714644a38213d059f3ddced08cfc119ca8a0ab7.tar.gz external_llvm-9714644a38213d059f3ddced08cfc119ca8a0ab7.tar.bz2 |
Keep empty assembly macro argument values in the middle of the list.
Empty macro arguments at the end of the list should be as-if not specified at
all, but those in the middle of the list need to be kept so as not to screw
up the positional numbering. E.g.:
.macro foo
foo_-bash___:
nop
.endm
foo 1, 2, 3, 4
foo 1, , 3, 4
Should create two labels, "foo_1_2_3_4" and "foo_1__3_4".
rdar://11948769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/AsmParser/macro-args.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/MC/AsmParser/macro-args.s b/test/MC/AsmParser/macro-args.s index 13b197a..6d08421 100644 --- a/test/MC/AsmParser/macro-args.s +++ b/test/MC/AsmParser/macro-args.s @@ -42,3 +42,15 @@ top bar, 42 // CHECK-NOT: fred // CHECK: _bar // CHECK-NEXT: fred = 42 + + +.macro foo +foo_$0_$1_$2_$3: + nop +.endm + +foo 1, 2, 3, 4 +foo 1, , 3, 4 + +// CHECK: foo_1_2_3_4: +// CHECK: foo_1__3_4: |