File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; RUN: opt -help | FileCheck %s
2
+
3
+ ; Make sure the help message is printed.
4
+ ; CHECK: -O1
5
+ ; CHECK-SAME: - Optimization level 1. Similar to clang -O1
Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ StandardLinkOpts("std-link-opts",
128
128
cl::desc("Include the standard link time optimizations"));
129
129
#endif // HLSL Change Ends
130
130
131
+ // HLSL Change Starts: add help option.
132
+ static cl::opt<bool > Help (" help" , cl::desc(" Print help" ));
133
+ // HLSL Change Ends
134
+
131
135
static cl::opt<bool >
132
136
OptLevelO1 (" O1" ,
133
137
cl::desc (" Optimization level 1. Similar to clang -O1" ));
@@ -383,6 +387,12 @@ int __cdecl main(int argc, char **argv) {
383
387
384
388
cl::ParseCommandLineOptions (argc, argv,
385
389
" llvm .bc -> .bc modular optimizer and analysis printer\n " );
390
+ // HLSL Change Starts: add help option.
391
+ if (Help) {
392
+ cl::PrintHelpMessage ();
393
+ return 2 ;
394
+ }
395
+ // HLSL Change Ends
386
396
387
397
if (AnalyzeOnly && NoOutput) {
388
398
errs () << argv[0 ] << " : analyze mode conflicts with no-output mode.\n " ;
You can’t perform that action at this time.
0 commit comments