@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
Oh, I hadn't included the updated to stringifying the qualifier so these wer
@@ -327,6 +330,27 @@ a discriminator determined as follows:
is ``ptrauth_blend_discriminator(&x, discriminator)``; see
`ptrauth_blend_discriminator`_.
+``ptrauth_qualifier_options``
+~
+
+The options parameter to the ``__ptrauth`` qualifier is a
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/4] [clang][PAC] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/5] [clang][PAC] add support for options parameter to
__ptrauth
T
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr {
def PointerAuth : TypeAttr {
let Spellings = [CustomKeyword<"__ptrauth">];
- let Args = [IntArgument<"Key">,
- BoolArgument<"AddressDiscriminated", 1>,
- IntArgument<"ExtraDiscr
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/2] [clang][PAC] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][PAC] add support for options parameter to __ptrauth
This P
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr {
def PointerAuth : TypeAttr {
let Spellings = [CustomKeyword<"__ptrauth">];
- let Args = [IntArgument<"Key">,
- BoolArgument<"AddressDiscriminated", 1>,
- IntArgument<"ExtraDiscr
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
I was meaning "is there a more idiomatic way to have these string constants
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
It's not stored as a string (or even an attribute), they're stored as flags
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
erichkeane wrote:
I'd suggest doing a string-switch on it, then storing an enum in the AST
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/136828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
I think this is on the right path, but others have good comments here so far.
https://github.com/llvm/llvm-project/pull/136828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
@@ -1735,8 +1735,8 @@ def warn_pragma_unroll_cuda_value_in_parens : Warning<
"argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
InGroup;
-def err_ptrauth_qualifier_bad_arg_count : Error<
- "'__ptrauth' qualifier must take between 1 and 3 arguments
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr {
def PointerAuth : TypeAttr {
let Spellings = [CustomKeyword<"__ptrauth">];
- let Args = [IntArgument<"Key">,
- BoolArgument<"AddressDiscriminated", 1>,
- IntArgument<"ExtraDiscr
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
AaronBallman wrote:
At the language option level, I think it's more idiomatic to use an en
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 8d42eca9da4afd53b9d51fda5a8d285ed2cdeb72 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/2] [clang][PAC] add support for options parameter to
__ptrauth
T
@@ -8350,14 +8350,16 @@ static void HandleNeonVectorTypeAttr(QualType &CurType,
const ParsedAttr &Attr,
/// Handle the __ptrauth qualifier.
static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T,
const ParsedAttr &Attr, Sema &S) {
-
@@ -8373,10 +8375,140 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx,
QualType &T,
IsAddressDiscriminated);
IsInvalid |= !S.checkPointerAuthDiscriminatorArg(
ExtraDiscriminatorArg, PointerAuthDiscArgKind::Extra,
@@ -1735,8 +1735,8 @@ def warn_pragma_unroll_cuda_value_in_parens : Warning<
"argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
InGroup;
-def err_ptrauth_qualifier_bad_arg_count : Error<
- "'__ptrauth' qualifier must take between 1 and 3 arguments
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 8d42eca9da4afd53b9d51fda5a8d285ed2cdeb72 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][PAC] add support for options parameter to __ptrauth
This P
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
@llvm/pr-subscribers-clang
Author: Oliver Hunt (ojhunt)
Changes
[clang][PAC] add support for options parameter to __ptrauth
This PR adds support for an 'options' parameter for the __ptrauth
qualifier.
The initial version only exposes the
https://github.com/ojhunt ready_for_review
https://github.com/llvm/llvm-project/pull/136828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
@cor3ntin @AaronBallman is there a better/more idiomatic way of doing these?
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 6f161d3699cac269f74376dc02697a7242b5 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][PAC] add support for options parameter to __ptrauth
This P
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/136828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
Rate limit ยท GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From d53d1ad252ad5c4c9db61ad03e8a606e195156d9 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][PAC] add support for options parameter to __ptrauth
This P
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From f19a0a6045c98211fcb354e6614aa6707dfccc59 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][ptrauth] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/136828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
30 matches
Mail list logo