This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFC] Simplify part of Options::GenerateOptionUsage
ClosedPublic

Authored by DavidSpickett on Apr 11 2022, 6:03 AM.

Details

Summary

Use llvm::enumerate, remove an unused arg name stream and
replace repeated uses of indexing to get the option def.

We could use map instead of multimap but I'm not 100% that
would be NFC. All short options should be unique in theory.

Depends on D123500

Diff Detail

Event Timeline

DavidSpickett created this revision.Apr 11 2022, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 6:03 AM
DavidSpickett requested review of this revision.Apr 11 2022, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 6:03 AM
This revision is now accepted and ready to land.Apr 11 2022, 9:44 PM