Page MenuHomePhabricator

[ms] [llvm-ml] Support macro function invocations in expressions
ClosedPublic

Authored by epastor on Oct 19 2020, 2:00 PM.

Details

Summary

Accept macro function definitions, and apply them when invoked in operand position.

Diff Detail

Event Timeline

epastor created this revision.Oct 19 2020, 2:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2020, 2:00 PM
epastor requested review of this revision.Oct 19 2020, 2:00 PM
epastor updated this revision to Diff 299677.Oct 21 2020, 7:12 AM

Fix case of parameter

epastor updated this revision to Diff 303167.Nov 5 2020, 10:32 AM

Rebase on HEAD

thakis accepted this revision.Nov 13 2020, 8:37 AM

Can we also add a test where EndStatementAtEOFStack isn't empty at end-of-file?

llvm/lib/MC/MCParser/MasmParser.cpp
3126

I think the "require lexing" part is already covered by the test you're adding. Is that right?

This revision is now accepted and ready to land.Nov 13 2020, 8:37 AM
epastor updated this revision to Diff 305215.Nov 13 2020, 11:06 AM
epastor marked an inline comment as done.

Add assert() that EndStatementAtEOFStack ends up empty.

Can we also add a test where EndStatementAtEOFStack isn't empty at end-of-file?

As near as I can tell, that can't happen as written! I've added an assert for this.

llvm/lib/MC/MCParser/MasmParser.cpp
3126

Yes, that's correct.

epastor updated this revision to Diff 305261.Nov 13 2020, 2:08 PM

Fix an off-by-one error in the recently-added assert.

This revision was landed with ongoing or failed builds.Nov 23 2020, 11:17 AM
This revision was automatically updated to reflect the committed changes.