[PATCH] D128944: [ms] [llvm-ml] Add support for anonymous labels (`@@`, `@B`, `@F`)

Eric Astor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 08:04:40 PDT 2022


epastor marked an inline comment as done.
epastor added a comment.

In D128944#3623568 <https://reviews.llvm.org/D128944#3623568>, @rnk wrote:

> Should these be unnamed labels so they don't appear in the COFF file symbol table? I'm guessing ml64 doesn't produce symbols for these labels, but correct me if I'm wrong.
>
> If that is the case, I suggest:
>
> - keep the counter
> - store a vector of MCSymbols indexed by label counter
> - use a getOrCreate operation to fill in that vector or read from it to handle support for forward references (`@F`)

It turns out we've already got support for directional local labels inside of MCContext; the difference here is that MASM only supports one set of local labels, where GNU-style assembler supports an integer-indexed family of them. I've revised this change to take advantage of the pre-existing support instead!



================
Comment at: llvm/lib/MC/MCParser/MasmParser.cpp:406
 
-  /// Maps data location names to types.
   StringMap<AsmTypeInfo> KnownType;
----------------
rnk wrote:
> Looks like an unintended change
Removed, thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128944/new/

https://reviews.llvm.org/D128944



More information about the llvm-commits mailing list