-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[clang] Expose -f(no-)wrapv as clang-cl option #120787
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
Conversation
Also move the -fno-wrapv option definition next to the -fwrapv one while here.
@llvm/pr-subscribers-clang Author: Nico Weber (nico) ChangesAlso move the -fno-wrapv option definition next to the -fwrapv one while here. Full diff: https://github.com/llvm/llvm-project/pull/120787.diff 2 Files Affected:
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 638f8c52053ec5..ae83c0754d84bc 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3506,8 +3506,6 @@ def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>;
def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
-def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>,
- Visibility<[ClangOption, FlangOption]>;
def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Synthesize retain and release calls for Objective-C pointers">;
@@ -4278,8 +4276,10 @@ defm virtual_function_elimination : BoolFOption<"virtual-function-elimination",
NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>;
def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>,
- Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
+ Visibility<[ClangOption, CLOption, CC1Option, FlangOption, FC1Option]>,
HelpText<"Treat signed integer overflow as two's complement">;
+def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>,
+ Visibility<[ClangOption, CLOption, FlangOption]>;
def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Store string literals as writable data">,
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 477e8489e74280..a8120e0ce39a24 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -738,6 +738,8 @@
// RUN: -fimplicit-modules \
// RUN: -fno-implicit-modules \
// RUN: -ftrivial-auto-var-init=zero \
+// RUN: -fwrapv \
+// RUN: -fno-wrapv \
// RUN: --version \
// RUN: -Werror /Zs -- %s 2>&1
|
@llvm/pr-subscribers-clang-driver Author: Nico Weber (nico) ChangesAlso move the -fno-wrapv option definition next to the -fwrapv one while here. Full diff: https://github.com/llvm/llvm-project/pull/120787.diff 2 Files Affected:
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 638f8c52053ec5..ae83c0754d84bc 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3506,8 +3506,6 @@ def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>;
def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
-def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>,
- Visibility<[ClangOption, FlangOption]>;
def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Synthesize retain and release calls for Objective-C pointers">;
@@ -4278,8 +4276,10 @@ defm virtual_function_elimination : BoolFOption<"virtual-function-elimination",
NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>;
def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>,
- Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
+ Visibility<[ClangOption, CLOption, CC1Option, FlangOption, FC1Option]>,
HelpText<"Treat signed integer overflow as two's complement">;
+def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>,
+ Visibility<[ClangOption, CLOption, FlangOption]>;
def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Store string literals as writable data">,
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 477e8489e74280..a8120e0ce39a24 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -738,6 +738,8 @@
// RUN: -fimplicit-modules \
// RUN: -fno-implicit-modules \
// RUN: -ftrivial-auto-var-init=zero \
+// RUN: -fwrapv \
+// RUN: -fno-wrapv \
// RUN: --version \
// RUN: -Werror /Zs -- %s 2>&1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/8274 Here is the relevant piece of the build log for the reference
|
Also move the -fno-wrapv option definition next to the -fwrapv one while here.
Also move the -fno-wrapv option definition next to the -fwrapv one while here.