-
Notifications
You must be signed in to change notification settings - Fork 15.7k
[clang][PAC] add support for options parameter to __ptrauth #136828
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
927380b
02bc476
5903e97
ef4a253
6b1501a
96a81fa
31aa3a4
7f80183
c61f77e
7abce28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1047,6 +1047,18 @@ def err_ptrauth_extra_discriminator_invalid : Error< | |
| "invalid extra discriminator flag '%0'; '__ptrauth' requires a value between " | ||
| "'0' and '%1'">; | ||
|
|
||
| // __ptrauth qualifier options string | ||
| def note_ptrauth_evaluating_options | ||
| : Note<"options parameter evaluated to '%0'">; | ||
| def err_ptrauth_invalid_option : Error<"'__ptrauth' options parameter %0">; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Look for uses of |
||
| def err_ptrauth_unknown_authentication_option | ||
| : Error<"unknown '__ptrauth' authentication option '%0'">; | ||
| def err_ptrauth_repeated_authentication_option | ||
| : Error<"repeated '__ptrauth' authentication %select{mode|option}0%select{, prior " | ||
| "mode was '%2'| '%1'}0">; | ||
| def err_ptrauth_option_missing_comma | ||
| : Error<"missing comma after '%0' option in '__ptrauth' qualifier">; | ||
|
|
||
| /// main() | ||
| // static main() is not an error in C, just in C++. | ||
| def warn_static_main : Warning<"'main' should not be declared static">, | ||
|
|
@@ -1737,7 +1749,6 @@ def err_static_assert_requirement_failed : Error< | |
| def note_expr_evaluates_to : Note< | ||
| "expression evaluates to '%0 %1 %2'">; | ||
|
|
||
|
|
||
| def subst_user_defined_msg : TextSubstitution< | ||
| "%select{the message|the expression}0 in " | ||
| "%select{a static assertion|this asm operand}0">; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned { | |
| SignAndAuth | ||
| }; | ||
|
|
||
| static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip = "strip"; | ||
|
||
| static constexpr llvm::StringLiteral PointerAuthenticationOptionSignAndStrip = | ||
| "sign-and-strip"; | ||
| static constexpr llvm::StringLiteral PointerAuthenticationOptionSignAndAuth = | ||
| "sign-and-auth"; | ||
| static constexpr llvm::StringLiteral PointerAuthenticationOptionIsaPointer = | ||
| "isa-pointer"; | ||
| static constexpr llvm::StringLiteral | ||
| PointerAuthenticationOptionAuthenticatesNullValues = | ||
| "authenticates-null-values"; | ||
|
|
||
| /// Bitfields of LangOptions, split out from LangOptions in order to ensure that | ||
| /// this large collection of bitfields is a trivial class type. | ||
| class LangOptionsBase { | ||
|
|
||
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.
This PR does not actually provide the implementation of this option, as it touches a number of places unrelated to parsing the option.