forked from OSchip/llvm-project
[MC] Fix nested macro body parsing
Add missing .rep case in nestlevel checking for macro body parsing. llvm-svn: 337398
This commit is contained in:
parent
a633e9dbde
commit
e24fcd5382
|
@ -5317,7 +5317,8 @@ MCAsmMacro *AsmParser::parseMacroLikeBody(SMLoc DirectiveLoc) {
|
|||
}
|
||||
|
||||
if (Lexer.is(AsmToken::Identifier) &&
|
||||
(getTok().getIdentifier() == ".rept" ||
|
||||
(getTok().getIdentifier() == ".rep" ||
|
||||
getTok().getIdentifier() == ".rept" ||
|
||||
getTok().getIdentifier() == ".irp" ||
|
||||
getTok().getIdentifier() == ".irpc")) {
|
||||
++NestLevel;
|
||||
|
|
|
@ -28,3 +28,16 @@ half_a_dozen_daffodils:
|
|||
# CHECK: .long 3674148113
|
||||
# CHECK: .long 3674148113
|
||||
|
||||
|
||||
nested_reps:
|
||||
.rep 2
|
||||
.rep 2
|
||||
.long 0xdeadbeef
|
||||
.endr
|
||||
.endr
|
||||
|
||||
# CHECK-LABEL: nested_reps
|
||||
# CHECK: .long 3735928559
|
||||
# CHECK: .long 3735928559
|
||||
# CHECK: .long 3735928559
|
||||
# CHECK: .long 3735928559
|
||||
|
|
Loading…
Reference in New Issue