This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] add -v alias for --version
ClosedPublic

Authored by nickdesaulniers on Apr 28 2021, 1:10 PM.

Diff Detail

Event Timeline

nickdesaulniers requested review of this revision.Apr 28 2021, 1:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 1:10 PM
MaskRay accepted this revision.Apr 28 2021, 1:39 PM

Looks great! Please wait for @jhenderson, though.

llvm/test/tools/llvm-objdump/version.test
5

CHECK: LLVM version

(While llvm-readobj/basic.test says the "LLVM" can be changed by cmake PACKAGE_NAME, I used "LLVM version" for llvm-symbolizer and it seems fine so far. )

This revision is now accepted and ready to land.Apr 28 2021, 1:39 PM

a -v alias for --version

a -> Add

rupprecht accepted this revision.Apr 28 2021, 2:48 PM
rupprecht added inline comments.
llvm/test/tools/llvm-objdump/version.test
5

"LLVM version" is fine. Just don't go further than that -- e.g. don't check "LLVM version XX.Y"

nickdesaulniers retitled this revision from [llvm-objdump] a -v alias for --version to [llvm-objdump] add -v alias for --version.Apr 28 2021, 5:01 PM
nickdesaulniers marked 2 inline comments as done.
nickdesaulniers added inline comments.
llvm/test/tools/llvm-objdump/version.test
5

My full version string looks like:

LLVM (http://llvm.org/):
  LLVM version 13.0.0git
...

so this is intentionally matching the initial LLVM; I don't think matching the word version adds any value here.

Please update the CommandGuide docs (llvm/docs/CommandGuide) for llvm-objdump to include the new alias.

llvm/test/tools/llvm-objdump/version.test
5

I'd think it not unlikely for other output from the tool to incldue the LLVM string personally, so there's a (probably small) risk of this being a false positive.

  • update command guide, add "version" to test
MaskRay accepted this revision.Apr 29 2021, 1:52 PM
This revision was automatically updated to reflect the committed changes.