summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-opt-report/OptReport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-opt-report/OptReport.cpp')
-rw-r--r--llvm/tools/llvm-opt-report/OptReport.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/llvm-opt-report/OptReport.cpp b/llvm/tools/llvm-opt-report/OptReport.cpp
index a6ca6146b48..3ea71fc47ef 100644
--- a/llvm/tools/llvm-opt-report/OptReport.cpp
+++ b/llvm/tools/llvm-opt-report/OptReport.cpp
@@ -36,6 +36,8 @@
using namespace llvm;
using namespace llvm::yaml;
+static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden);
+
// Mark all our options with this category, everything else (except for -version
// and -help) will be hidden.
static cl::OptionCategory
@@ -438,6 +440,11 @@ int main(int argc, const char **argv) {
"A tool to generate an optimization report from YAML optimization"
" record files.\n");
+ if (Help) {
+ cl::PrintHelpMessage();
+ return 0;
+ }
+
LocationInfoTy LocationInfo;
if (!readLocationInfo(LocationInfo))
return 1;
OpenPOWER on IntegriCloud