forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 349
🍒 [BoundsSafety] Re-introduce -funique-traps
as a legacy alias of -fbounds-safety-unique-traps
#11611
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
delcypher
merged 1 commit into
swiftlang:stable/21.x
from
delcypher:dliew/rdar-162204734-cherry-pick-stable-21.x
Oct 10, 2025
Merged
🍒 [BoundsSafety] Re-introduce -funique-traps
as a legacy alias of -fbounds-safety-unique-traps
#11611
delcypher
merged 1 commit into
swiftlang:stable/21.x
from
delcypher:dliew/rdar-162204734-cherry-pick-stable-21.x
Oct 10, 2025
+109
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bounds-safety-unique-traps` In rdar://158088410 (swiftlang#11455) the `-funique-traps` flag was removed in favor of a different implementation controlled by the `-fbounds-safety-unique-traps` flag. It turns out the `-funique-traps` flag is being used by an adopter of `-fbounds-safety`. To unbreak adopters of the flag this patch reintroduces the old flag (and its negation) as an alias of `-fbounds-safety-unique-traps` (`-fno-bounds-safety-unique-traps`) along with a diagnostic warning that `-funique-traps` (`-fno-unique-traps`) is deprecated. This patch doesn't use the `Alias<>` mixin in the `clang/Driver/Options.td` so "technically" at the implementation level `-funique-traps` isn't an alias of `-fbounds-safety-unique-traps`. This is done so that is possible distinguish use of the legacy flag from the new flag so that it is possible emit a deprecation warning. However, from the user's perspective `-funique-traps` and `-fbounds-safety-unique-traps` are aliases. We should remove `-funique-traps` eventually and that is tracked by rdar://162215869. rdar://162204734 (cherry picked from commit 38b7776)
@swift-ci test llvm |
@swift-ci test |
-funique-traps
as a legacy alias of -fbounds-safety-unique-traps
-funique-traps
as a legacy alias of -fbounds-safety-unique-traps
Windows testing failed due to timeout:
|
@swift-ci Please test Windows platform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In rdar://158088410
(#11455) the
-funique-traps
flag was removed in favor of a different implementation controlled by the-fbounds-safety-unique-traps
flag.It turns out the
-funique-traps
flag is being used by an adopter of-fbounds-safety
. To unbreak adopters of the flag this patch reintroduces the old flag (and its negation) as an alias of-fbounds-safety-unique-traps
(-fno-bounds-safety-unique-traps
) along with a diagnostic warning that-funique-traps
(-fno-unique-traps
) is deprecated.This patch doesn't use the
Alias<>
mixin in theclang/Driver/Options.td
so "technically" at the implementation level-funique-traps
isn't an alias of-fbounds-safety-unique-traps
. This is done so that is possible distinguish use of the legacy flag from the new flag so that it is possible emit a deprecation warning. However, from the user's perspective-funique-traps
and-fbounds-safety-unique-traps
are aliases.We should remove
-funique-traps
eventually and that is tracked by rdar://162215869.rdar://162204734
(cherry picked from commit 38b7776)