This is an archive of the discontinued LLVM Phabricator instance.

[AsmParser] Fix support for zero bit integer types.
ClosedPublic

Authored by lattner on Dec 10 2020, 10:51 PM.

Details

Summary

Zero bit integer types are supported by IntegerType for consistency,
but the asmparser never got updated. Allow them to be parsed, as
required to fix CIRCT issue #316

Diff Detail

Event Timeline

lattner created this revision.Dec 10 2020, 10:51 PM
lattner requested review of this revision.Dec 10 2020, 10:51 PM

It seems that we would accept to parse i032 in place of i32, is this intentional? Should we limit the 0 to i0 alone?

I can do that, but is there a reason to reject that?

mehdi_amini accepted this revision.Dec 11 2020, 11:11 AM

I don't know :)
I just wanted to be sure this was intentional!
I'm fine with letting this through.

This revision is now accepted and ready to land.Dec 11 2020, 11:11 AM
This revision was landed with ongoing or failed builds.Dec 12 2020, 9:24 PM
This revision was automatically updated to reflect the committed changes.

Thanks Mehdi!