This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Use structured bindings to replace std::tie in some cases.
Needs ReviewPublic

Authored by craig.topper on Sep 23 2022, 9:59 AM.

Details

Summary

This simplies code where we declared two variables and immediately tied them.

I've focused on the most common case of splitting into Lo and Hi
SDValues or EVTs when splitting vectors.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 23 2022, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 9:59 AM
craig.topper requested review of this revision.Sep 23 2022, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 9:59 AM

I've no objections although I don't know how this matches with the coding standard regarding auto (which was written prior to c++17 in the codebase)? Ideally we'd mention structured bindings in the section on use of auto.