parentheses from argument lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110692
91177308-0d34-0410-b5e6-
96231b3b80d8
// list.
if (ParenLevel == 0 && Lexer.is(AsmToken::Comma)) {
MacroArguments.push_back(std::vector<AsmToken>());
- } else if (Lexer.is(AsmToken::LParen)) {
- ++ParenLevel;
- } else if (Lexer.is(AsmToken::RParen)) {
- if (ParenLevel)
- --ParenLevel;
} else {
+ // Adjust the current parentheses level.
+ if (Lexer.is(AsmToken::LParen))
+ ++ParenLevel;
+ else if (Lexer.is(AsmToken::RParen) && ParenLevel)
+ --ParenLevel;
+
+ // Append the token to the current argument list.
MacroArguments.back().push_back(getTok());
}
Lex();
// CHECK: .globl "1 23 $3 2"
test3 1,2 3
+
+.macro test4
+.globl "$0 -- $1"
+.endmacro
+
+// CHECK: .globl "ab)(,) -- (cd)"
+test4 a b)(,),(cd)