Support @Version and @Line as built-in symbols. For now, resolves @Version to 1427 (the same as for the VS 2019 release of ML.EXE).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Can you check if ml.exe allows defining a local variable overriding e.g. @Line? What happens then? Does it error? Can you add a test for that?
Confirmed that ml.exe errors in this case; matched this behavior, and added corresponding test.
llvm/lib/MC/MCParser/MasmParser.cpp | ||
---|---|---|
3516 | We're removing Var.NumericValue because it breaks the parallels between Variables and BuiltinSymbols. Instead, we rely on the value stored in the symbol itself as authoritative - and if it's not an MCConstantExpr, then it's definitely not a MASM variable. Fixed the named parameter comment style, though I believe this was copied from AsmParser.cpp originally... |
Why is this changing? If it's intentional, nit: Named parameter comment style in LLVM is /*SetUsed=*/false (ie with = and without space)