-
Notifications
You must be signed in to change notification settings - Fork 339
[BoundsSafety] Rename experimental C++ and Objective-C flags and make them CC1 only #10635
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
@swift-ci test llvm |
@@ -543,8 +543,8 @@ BENIGN_LANGOPT(CheckConstexprFunctionBodies, 1, 1, | |||
LANGOPT(BoundsSafety, 1, 0, "Bounds safety extension for C") | |||
/* TO_UPSTREAM(BoundsSafety) ON*/ | |||
LANGOPT(BoundsSafetyAttributes, 1, 0, "Experimental bounds safety attributes") | |||
LANGOPT(BoundsAttributesCXXExperimental, 1, 0, "Experimental bounds attributes for C++") | |||
LANGOPT(BoundsAttributesObjCExperimental, 1, 0, "Experimental bounds attributes for Objective-C") | |||
LANGOPT(BoundsSafetyCXXExperimental, 1, 0, "Experimental bounds attributes for C++") |
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.
@hnrklssn @patrykstefanski @rapidsna Should we drop the Experimental
suffix from the language option? Upstream doesn't seem to do this but I kind of like having the suffix there because it makes it much clearer that this language option is experimental.
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.
I have no strong opinion in either direction on this one
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, but we may want some more time to let the others weigh in
… them CC1 only The existing `-fbounds-attributes-cxx-experimental` and `-fbounds-attributes-objc-experimental` flags were previously exposed as driver and CC1 flags. However, given that these modes are highly experimental we don't want to encourage their use so these flags have no been made CC1 only flags. The functionality is still available from the driver by doing `-Xclang <flag name>`. This patch also does a rename of the flags to be prefixed with `experimental-` which upstream prefers. 1. `-fbounds-attributes-cxx-experimental` -> `-fexperimental-bounds-safety-cxx` 2. `-fbounds-attributes-objc-experimental` -> `-fexperimental-bounds-safety-objc`. This patch also renames "bounds attributes" to "bounds safety" for things associated with these flags (e.g. `LangOptions::BoundsSafetyCXXExperimental`). "bounds attributes" is the legacy name that we need to slowly purge from the codebase and this is one small step towards that goal. rdar://149423268
b30b975
to
89573e8
Compare
@swift-ci test llvm |
Compile errors look unrelated:
|
The existing
-fbounds-attributes-cxx-experimental
and-fbounds-attributes-objc-experimental
flags were previously exposed as driver and CC1 flags. However, given that these modes are highly experimental we don't want to encourage their use so these flags have no been made CC1 only flags. The functionality is still available from the driver by doing-Xclang <flag name>
.This patch also does a rename of the flags to be prefixed with
experimental-
which upstream prefers.-fbounds-attributes-cxx-experimental
->-fexperimental-bounds-safety-cxx
-fbounds-attributes-objc-experimental
->-fexperimental-bounds-safety-objc
.This patch also renames "bounds attributes" to "bounds safety" for things associated with these flags (e.g.
LangOptions::BoundsSafetyCXXExperimental
). "bounds attributes" is the legacy name that we need to slowly purge from the codebase and this is one small step towards that goal.rdar://149423268