This is an archive of the discontinued LLVM Phabricator instance.

[MC][AMDGPU] Consume EndOfStatement in asm parser
ClosedPublic

Authored by scott.linder on Dec 4 2020, 2:11 PM.

Details

Summary

Avoids spurious newlines showing up in the output when emitting assembly
via MC.

Diff Detail

Event Timeline

scott.linder created this revision.Dec 4 2020, 2:11 PM
scott.linder requested review of this revision.Dec 4 2020, 2:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2020, 2:11 PM
arsenm accepted this revision.Dec 4 2020, 2:23 PM
This revision is now accepted and ready to land.Dec 4 2020, 2:23 PM
MaskRay accepted this revision.Dec 4 2020, 2:47 PM

LGTM.

Rebase over https://reviews.llvm.org/D92084

I think I need some input on how best to handle this. I'm not particularly
happy with what I have right now, but after spending some time trying to do
better and not making much progress I thought I would ask if anyone else has a
better idea.

dp added a comment.Dec 9 2020, 3:20 AM

I'd have reverted to using IDLoc because the error message is clear enough.
I'm sorry that my change caused such trouble.
The better is the enemy of the good :-)

In D92690#2442357, @dp wrote:

I'd have reverted to using IDLoc because the error message is clear enough.
I'm sorry that my change caused such trouble.
The better is the enemy of the good :-)

That makes sense to me, I probably should have asked first :^)

I also realized after having slept on it that my current patch doesn't work for any non-ascii input anyway.

I will just revert that part of your earlier change and put up a review for it separately, then this patch should rebase cleanly.

Rebase the original version of the patch again; this is the same diff that was
approved already, so I am going to just go ahead and commit it. If anyone has
any objections I can open another review to address them.

This revision was landed with ongoing or failed builds.Dec 9 2020, 1:46 PM
This revision was automatically updated to reflect the committed changes.