forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MCParser] Apply missing .altmacro changes (reverted due to MIOpen)
cherry-picked: 812f9e8 [email protected] Fri Jul 5 14:00:26 2024 -0700 [MCParser] .altmacro: ignore & after a token f8b1ca4 [email protected] Fri Jul 5 14:08:13 2024 -0700 [MCParser] .altmacro: Support argument expansion not preceded by Change-Id: I752d3bf25f827976dd296ef3cac4dec7724e6a61
- Loading branch information
1 parent
cbce559
commit 12d3b1a
Showing
3 changed files
with
76 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Arguments can be expanded even if they are not preceded by \ | ||
# RUN: llvm-mc -triple=x86_64 %s | FileCheck %s | ||
|
||
# CHECK: 1 1 1a | ||
# CHECK-NEXT: 1 2 1a 2b | ||
# CHECK-NEXT: \$b \$b | ||
.altmacro | ||
.irp ._a,1 | ||
.print "\._a \._a& ._a&a" | ||
.irp $b,2 | ||
.print "\._a \$b ._a&a $b&b" | ||
.endr | ||
.print "\$b \$b&" | ||
.endr | ||
|
||
# CHECK: 1 1& ._a&a | ||
# CHECK-NEXT: \$b \$b& | ||
.noaltmacro | ||
.irp ._a,1 | ||
.print "\._a \._a& ._a&a" | ||
.print "\$b \$b&" | ||
.endr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters