This is an archive of the discontinued LLVM Phabricator instance.

[mlir:ElementsAttr] Avoid crash on empty contiguous ranges
ClosedPublic

Authored by rriddle on Sep 24 2021, 4:45 PM.

Details

Summary

We currently, incorrectly, assume that a range always has at least
one element when building a contiguous range. This commit adds
a proper empty check to avoid crashing.

Diff Detail

Event Timeline

rriddle created this revision.Sep 24 2021, 4:45 PM
rriddle requested review of this revision.Sep 24 2021, 4:45 PM
Jing accepted this revision.Sep 24 2021, 4:48 PM
This revision is now accepted and ready to land.Sep 24 2021, 4:48 PM
This revision was landed with ongoing or failed builds.Sep 24 2021, 4:57 PM
This revision was automatically updated to reflect the committed changes.