[PATCH] D150964: [llvm-profdata] Accept --version argument
Michael Platings via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 06:45:08 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG65219053892d: [llvm-profdata] Accept --version argument (authored by michaelplatings).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150964/new/
https://reviews.llvm.org/D150964
Files:
llvm/test/tools/llvm-profdata/version.test
llvm/tools/llvm-profdata/llvm-profdata.cpp
Index: llvm/tools/llvm-profdata/llvm-profdata.cpp
===================================================================
--- llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -3070,6 +3070,12 @@
<< "Available commands: merge, show, overlap\n";
return 0;
}
+
+ if (strcmp(argv[1], "--version") == 0) {
+ outs() << ProgName << '\n';
+ cl::PrintVersionMessage();
+ return 0;
+ }
}
if (argc < 2)
Index: llvm/test/tools/llvm-profdata/version.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-profdata/version.test
@@ -0,0 +1,4 @@
+# RUN: llvm-profdata --version | FileCheck %s
+
+# CHECK: llvm-profdata{{$}}
+# CHECK: LLVM version {{.*}}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150964.524280.patch
Type: text/x-patch
Size: 790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230522/dddaa2e7/attachment.bin>
More information about the llvm-commits
mailing list