Skip to content

[NFC][clang][Driver] Specify options for <arg> with -save-temps=<arg> #80921

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

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

lamb-j
Copy link
Contributor

@lamb-j lamb-j commented Feb 7, 2024

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 7, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 7, 2024

@llvm/pr-subscribers-clang

Author: Jacob Lambert (lamb-j)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/80921.diff

1 Files Affected:

  • (modified) clang/include/clang/Driver/Options.td (+3-1)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 4b232b8aab722..6b13530799e10 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -5392,7 +5392,9 @@ def regcall4 : Flag<["-"], "regcall4">, Group<m_Group>,
   MarshallingInfoFlag<LangOpts<"RegCall4">>;
 def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[NoXarchOption]>,
   Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
-  HelpText<"Save intermediate compilation results.">;
+  HelpText<"Save intermediate compilation results. The <arg> option can be set "
+  "to cwd for current working directory, or obj which will save temporary "
+  "files in the same directory as the final output file">;
 def save_temps : Flag<["-", "--"], "save-temps">, Flags<[NoXarchOption]>,
   Visibility<[ClangOption, FlangOption, FC1Option]>,
   Alias<save_temps_EQ>, AliasArgs<["cwd"]>,

@@ -5392,7 +5392,9 @@ def regcall4 : Flag<["-"], "regcall4">, Group<m_Group>,
MarshallingInfoFlag<LangOpts<"RegCall4">>;
def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[NoXarchOption]>,
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
HelpText<"Save intermediate compilation results.">;
HelpText<"Save intermediate compilation results. The <arg> option can be set "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<arg> is an argument, not an option, but it is unnecessary to mention it is an argument.

<arg> can be set to 'cwd' for ..., or 'obj' ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The committed version does not contain single quotes. I'll add them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch, thanks

@lamb-j lamb-j merged commit 35c4f02 into llvm:main Feb 8, 2024
@lamb-j lamb-j deleted the save-temps-doc branch February 8, 2024 19:35
MaskRay added a commit that referenced this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants