[llvm] [llvm-ml] make TEXTEQU directive not to eagerly expand macros in arguments (PR #209526)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 07:37:50 PDT 2026
================
@@ -2935,14 +2937,13 @@ bool MasmParser::parseDirectiveEquate(StringRef IDVal, StringRef Name,
Value += TextItem;
// Accept a text-list, not just one text-item.
- auto parseItem = [&]() -> bool {
+ while (getTok().is(AsmToken::Comma)) {
+ Lex(DoNotExpandMacros);
if (parseTextItem(TextItem))
- return TokError("expected text item");
+ return TokError("expected text item in '" + Twine(IDVal) +
+ "' directive");
Value += TextItem;
- return false;
- };
- if (parseOptionalToken(AsmToken::Comma) && parseMany(parseItem))
- return addErrorSuffix(" in '" + Twine(IDVal) + "' directive");
+ }
----------------
dingxiangfei2009 wrote:
Oh yeah, we need to handle `EndOfStatement`, too. I did not test that.
https://github.com/llvm/llvm-project/pull/209526
More information about the llvm-commits
mailing list