Commit 195ba457 authored by Fangrui Song's avatar Fangrui Song
Browse files

[MCAsmParser] .macro/.rept/.irp/.irpc: remove excess \n after expansion

```
.irp foo,1
nop
.endr
nop
```

expands to an excess EOL between two nop lines. Other loop directives
and .macro have the same issue.

`Lex()` at "Jump to the macro instantiation and prime the lexer"
requires that there is one single \n token in CurTok. Therefore, we
cannot consume the trailing \n when parsing the macro(-like) body.
(commit c6e787f7 (reverted by
1e5f29af))

Instead, skip the potential \n after jumpToLoc at handleMacroExit.
parent 219476d2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment