Page MenuHomePhabricator

[llvm-ar] Implement the V modifier as an alias for --version
ClosedPublic

Authored by rupprecht on Oct 15 2019, 2:33 PM.

Details

Summary

Also update the help modifier (h) so that it works as a modifier and not just as a standalone h. For example, llvm-ar h prints the help message, but llvm-ar xh currently prints unknown option h.

Diff Detail

Event Timeline

rupprecht created this revision.Oct 15 2019, 2:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2019, 2:33 PM
MaskRay added a subscriber: grimar.Oct 15 2019, 7:35 PM

The V change looks good.

llvm/tools/llvm-ar/llvm-ar.cpp
389

For 'h', I originally did this in D67560, but @grimar suggested the current approach https://reviews.llvm.org/D67560?id=220121#inline-607437

grimar added inline comments.Oct 16 2019, 1:44 AM
llvm/tools/llvm-ar/llvm-ar.cpp
389

I do not mind to have it here if we want to support it as a modifier. I didn't know it can work like that..

MaskRay accepted this revision.Oct 16 2019, 3:08 AM
This revision is now accepted and ready to land.Oct 16 2019, 3:08 AM
This revision was automatically updated to reflect the committed changes.