[ms] [llvm-ml] Add support for anonymous labels (`@@`, `@B`, `@F`)
authorEric Astor <epastor@google.com>
Wed, 6 Jul 2022 16:31:50 +0000 (12:31 -0400)
committerEric Astor <epastor@google.com>
Thu, 7 Jul 2022 14:29:10 +0000 (10:29 -0400)
commit7d1a295484e3e6fd2dddec9ad73d3e227ed4629c
tree7ac5b1553ae468ca477f3926c1b1cd975b7cdb2f
parent8262ff44c53568564dc919a43fae274c8b748176
[ms] [llvm-ml] Add support for anonymous labels (`@@`, `@B`, `@F`)

ml.exe and ml64.exe support the use of anonymous labels, with @B and @F referring to the previous and next anonymous label respectively.

We add similar support to llvm-ml, with the exception that we are unable to emit an error message for an @F expression not followed by a @@ label.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D128944
llvm/lib/MC/MCParser/MasmParser.cpp
llvm/test/tools/llvm-ml/anonymous_labels.asm [new file with mode: 0644]
llvm/test/tools/llvm-ml/anonymous_labels_errors.asm [new file with mode: 0644]