diff options
| author | Fangrui Song <i@maskray.me> | 2024-05-17 23:02:54 -0700 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2024-05-17 23:02:54 -0700 |
| commit | 195ba4572129befa25ca56439515d7cb91587c56 (patch) | |
| tree | 6d3ec376cab0f531f0b61897ec5495da48600b20 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 219476d20fcdb21644944b0c204b4ac6d6ef3760 (diff) | |
[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 c6e787f771d1f9d6a846b2d9b8db6adcd87e8dba (reverted by
1e5f29af81a5f6fda308074f6345b9fba4faa71c))
Instead, skip the potential \n after jumpToLoc at handleMacroExit.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
