This is an archive of the discontinued LLVM Phabricator instance.

X86AsmParser AVX-512: Return error instead of hitting assert
ClosedPublic

Authored by BrandonTJones on Jan 29 2019, 2:55 AM.

Details

Summary

When parsing a sequence of tokens beginning with {, it will hit an assert and crash if the token afterwards is not an identifier. Instead of this, return a more verbose error as seen elsewhere in the function.

Diff Detail

Repository
rL LLVM

Event Timeline

BrandonTJones created this revision.Jan 29 2019, 2:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2019, 5:32 AM

test case?

I could not find the file that includes the test case for other similar errors (such as the closing curly brace). It seems to not exist.
Should I create a new test file for this?

test case?

I could not find the file that includes the test case for other similar errors (such as the closing curly brace). It seems to not exist.
Should I create a new test file for this?

Yes please, if you can set it up handling this case then we can add more complete test coverage in the future.

Added test case.

This revision is now accepted and ready to land.Feb 19 2019, 8:42 AM

I will need someone to commit this change for me. I do not have permission to commit to the svn repo.

This revision was automatically updated to reflect the committed changes.