[PATCH] D103993: [ms] [llvm-ml] Make variable redefinition match ML.EXE

Eric Astor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 15:52:45 PDT 2021


epastor created this revision.
Herald added a subscriber: hiraditya.
epastor requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

MASM specifies that all variable definitions are redefinable, except for EQU definitions to expressions. (TEXTEQU is unspecified, but appears to be fully redefinable as well.)

Also, in practice, ML.EXE allows redefinitions where the value doesn't change.

Make variable redefinition possible for text macros, suppressing expansion if written as the first argument to an EQU or TEXTEQU directive.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103993

Files:
  llvm/lib/MC/MCParser/MasmParser.cpp
  llvm/test/tools/llvm-ml/variable_redef.asm
  llvm/test/tools/llvm-ml/variable_redef_errors.asm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103993.351003.patch
Type: text/x-patch
Size: 6473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210609/414685a8/attachment.bin>


More information about the llvm-commits mailing list