[ms] [llvm-ml] Enable support for MASM-style macro procedures
authorEric Astor <epastor@google.com>
Wed, 4 Nov 2020 15:00:51 +0000 (10:00 -0500)
committerEric Astor <epastor@google.com>
Wed, 4 Nov 2020 15:29:57 +0000 (10:29 -0500)
commitbf027da04c4159fda2403038f9b4a97454a3b625
tree186fe14ae8f54ad763c5d5c81d9c89b7cf8eb15c
parent586c375fa3f0bb6f685a69ea43d7f235b76b6a9f
[ms] [llvm-ml] Enable support for MASM-style macro procedures

Allows the MACRO directive to define macro procedures with parameters and macro-local symbols.

Supports required and optional parameters (including default values), and matches ml64.exe for its macro-local symbol handling (up to 65536 macro-local symbols in any translation unit).

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89729
llvm/include/llvm/MC/MCAsmMacro.h
llvm/lib/MC/MCAsmMacro.cpp
llvm/lib/MC/MCParser/MasmParser.cpp
llvm/test/tools/llvm-ml/macro.test [new file with mode: 0644]
llvm/test/tools/llvm-ml/macro_errors.test [new file with mode: 0644]