From 7060fc5f8f99bbdf632163cc34b5506a2d565bb6 Mon Sep 17 00:00:00 2001 From: Faith Rivera Date: Thu, 28 Aug 2025 02:23:10 -0700 Subject: [llvm-lto2] Added version command for llvm-lto2 (#148866) Previously, the only way to check version for llvm-lto2 was to add version as a subcommand: `llvm-lto2 run --version`. This adds version as a main command for llvm-lto2 for more intuitive access. You can now check version with the command `llvm-lto2 --version`. --- llvm/tools/llvm-lto2/llvm-lto2.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/tools/llvm-lto2/llvm-lto2.cpp') diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp index fbde666..d27a219 100644 --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -616,5 +616,9 @@ int main(int argc, char **argv) { outs() << GlobalValue::getGUIDAssumingExternalLinkage(argv[2]) << '\n'; return 0; } + if (Subcommand == "--version") { + cl::PrintVersionMessage(); + return 0; + } return usage(); } -- cgit v1.1