Page MenuHomePhabricator

[CodeView] Allow empty types in member functions
ClosedPublic

Authored by cuviper on Jan 22 2019, 3:40 PM.

Details

Summary

CodeViewDebug::lowerTypeMemberFunction used to default to a Void
return type if the function's type array was empty. After D54667, it
started blindly indexing the 0th item for the return type, which fails
in getOperand for empty arrays if assertions are enabled.

This patch restores the Void return type for empty type arrays, and
adds a test generated by Rust in line-only debuginfo mode.

Diff Detail

Repository
rL LLVM

Event Timeline

cuviper created this revision.Jan 22 2019, 3:40 PM
rnk accepted this revision.Jan 22 2019, 4:27 PM

lgtm, thanks!

I had a bit of deja-vu because I thought we already fixed an assertion in this new code, and we did, in rL350073.

This revision is now accepted and ready to land.Jan 22 2019, 4:27 PM
This revision was automatically updated to reflect the committed changes.

Thanks, committed!

I'll have to review that discussion of this pointers wrt Rust, since self can be different things, but it hasn't caused us problems yet AFAIK.