Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools] add -help option for opt. #7002

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

python3kgae
Copy link
Contributor

Add -help option to opt in opt.cpp.

The -help option for opt in clean llvm3.7 was disabled with
disable -help

Fixes #5514

Add -help option to opt in opt.cpp.

The -help option for opt in clean llvm3.7 was disabled with
microsoft@d5bb308#diff-1c7e1b16bc72f52ebd811ef2a24aa91fc4df0f9b47c279b75d0bbb0ae1684d0aR1719

Fixes microsoft#5514
@python3kgae python3kgae requested a review from a team as a code owner November 6, 2024 18:37
Copy link
Contributor

github-actions bot commented Nov 6, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff ac36a797d3470e8ee906b98457a59270d01db30d 96bde99deeaad52f6d2d1c81296e9c00fa2ae0f8 -- tools/opt/opt.cpp
View the diff from clang-format here.
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index a7e9c989..faba610d 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -387,12 +387,12 @@ int __cdecl main(int argc, char **argv) {
 
   cl::ParseCommandLineOptions(argc, argv,
     "llvm .bc -> .bc modular optimizer and analysis printer\n");
-// HLSL Change Starts: add help option.
+  // HLSL Change Starts: add help option.
   if (Help) {
-      cl::PrintHelpMessage();
-      return 2;
+    cl::PrintHelpMessage();
+    return 2;
   }
-// HLSL Change Ends
+  // HLSL Change Ends
 
   if (AnalyzeOnly && NoOutput) {
     errs() << argv[0] << ": analyze mode conflicts with no-output mode.\n";
  • Check this box to apply formatting changes to this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

opt.exe -help doesn't do anything except recommend you use opt.exe -help
1 participant