https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/109056
>From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Mon, 16 Sep 2024 17:12:13 -0700
Subject: [PATCH 1/5] [PAC] Re-sign a pointer to a noexcept member function
whe
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/109056
>From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Mon, 16 Sep 2024 17:12:13 -0700
Subject: [PATCH 1/4] [PAC] Re-sign a pointer to a noexcept member function
whe
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/109056
>From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Mon, 16 Sep 2024 17:12:13 -0700
Subject: [PATCH 1/3] [PAC] Re-sign a pointer to a noexcept member function
whe
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/109056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/109056
>From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Mon, 16 Sep 2024 17:12:13 -0700
Subject: [PATCH 1/2] [PAC] Re-sign a pointer to a noexcept member function
whe
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/110048
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/109056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak reopened
https://github.com/llvm/llvm-project/pull/109056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahatanak wrote:
I meant to close https://github.com/llvm/llvm-project/pull/110048.
https://github.com/llvm/llvm-project/pull/109056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahatanak wrote:
This change isn't needed anymore as it was decided that noexcept shouldn't be
used to compute discriminators of function and member function pointers (see
https://github.com/llvm/llvm-project/issues/106487#issuecomment-2440364300).
https://github.com/llvm/llvm-project/pull/1100
ahatanak wrote:
This change isn't needed anymore as it was decided that `noexcept` shouldn't be
used to compute discriminators of function and member function pointers (see
https://github.com/llvm/llvm-project/issues/106487#issuecomment-2440364300).
https://github.com/llvm/llvm-project/pull/10
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/118938
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/116855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahatanak wrote:
ping
Removing `-Wgnu-zero-variadic-macro-argumentsis` broke multiple projects that
had been building fine for years.
https://github.com/llvm/llvm-project/pull/116855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
ahatanak wrote:
> There is almost certainly value in introducing a base class beneath
> ObjCMethodDecl and FunctionDecl that is both a NamedDecl and a DeclContext,
> because I'm not the first person to run into this problem. If I do the work,
> whose review/approval do we need? Is it deep enou
ahatanak wrote:
> I wish I didn't need to change the ExprConstant call stack machinery like
> this, happy to take suggestions. This is all because the closest ancestors of
> FunctionDecl and ObjCMethodDecl are NamedDecl and DeclGroup.
Should we enable `diagnose_if` for block methods too?
```
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/116855
Make the new diagnostic group a subgroup of the following diagnostic groups:
-Wpre-c23-compat
-Wgnu-zero-variadic-macro-arguments
-Wc++20-extensions
-Wc23-extensions
This change is needed as 5231005193afb8db01
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/116683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak approved this pull request.
https://github.com/llvm/llvm-project/pull/116683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/113745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/114241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4768,60 +4822,9 @@ Decl *SemaObjC::ActOnMethodDeclaration(
HasRelatedResultType);
SmallVector Params;
-
- for (unsigned i = 0, e = Sel.getNumArgs(); i != e; ++i) {
-QualType ArgType;
-TypeSourceInfo *DI;
-
-if (!ArgInfo[i].Type) {
- ArgType = Cont
ahatanak wrote:
This is needed for a private patch we'll be upstreaming in the future. Even
without that, I think it's an improvement over what we are doing now.
https://github.com/llvm/llvm-project/pull/114241
___
cfe-commits mailing list
cfe-commits
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/114241
None
>From 606344e958371d8978b2b64d870db5bfc0bd7b28 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 30 Oct 2024 07:36:31 -0700
Subject: [PATCH] [NFC} Call base class method in
DarwinAArch64TargetInfo
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/114241
>From 98fe1611486549221a1475188d6d19a2d2cc9d12 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 30 Oct 2024 07:36:31 -0700
Subject: [PATCH] [NFC] Call base class method in
DarwinAArch64TargetInfo::getO
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/114241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak ready_for_review
https://github.com/llvm/llvm-project/pull/110048
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/110048
>From b9a8339220635b9a0b2d77a11d80b496a18a917a Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 25 Sep 2024 14:47:05 -0700
Subject: [PATCH] [NFC] Add implicit cast kinds for function pointer
conversion
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/110048
The new cast kinds are needed to distinguish between no-op conversions and
conversions from pointers to noexcept functions to pointers to functions
without noexcept as the latter can cause function pointers to
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/110047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/110047
The new cast kinds are needed to distinguish between no-op conversions and
conversions from pointers to noexcept functions to pointers to functions
without noexcept as the latter can cause function pointers to
https://github.com/ahatanak approved this pull request.
https://github.com/llvm/llvm-project/pull/97128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
return Visit(const_cast(E));
case CK_NoOp: {
-return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE)
- : Visit(const_cast(E));
+i
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
return Visit(const_cast(E));
case CK_NoOp: {
-return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE)
- : Visit(const_cast(E));
+i
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
return Visit(const_cast(E));
case CK_NoOp: {
-return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE)
- : Visit(const_cast(E));
+i
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/109056
Fixes https://github.com/llvm/llvm-project/issues/106487.
>From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Mon, 16 Sep 2024 17:12:13 -0700
Subject: [PATCH] [PA
ahatanak wrote:
I think this change can confuse users in some cases.
```
class Error {
public:
Error() = default;
Error(Error &&);
Error &operator=(Error &&);
explicit operator bool() const;
};
Error getError();
Error foo() {
if (Error e = getError(1)) {
return e;
}
return Er
ahatanak wrote:
RFC for `__ptrauth`: https://discourse.llvm.org/t/rfc-ptrauth-qualifier/80710
https://github.com/llvm/llvm-project/pull/100830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
ahatanak wrote:
I'll try to come up with an RFC for the qualifier today.
https://github.com/llvm/llvm-project/pull/100830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahatanak wrote:
@rjmccall sent an RFC for upstreaming pointer authentication work to llvm-dev
in 2019, which mentions the `__ptrauth` qualifier.
https://discourse.llvm.org/t/rfc-pointer-authentication-for-arm64e/53433
I don't think we sent an RFC for adding support for the `__ptrauth` qualifie
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/102343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -104,6 +104,7 @@ FEATURE(thread_sanitizer,
LangOpts.Sanitize.has(SanitizerKind::Thread))
FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow))
FEATURE(scudo, LangOpts.Sanitize.hasOneOf(SanitizerKind::Scudo))
FEATURE(ptrauth_intrinsics, LangOpts.Pointer
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/102343
None
>From 2cc9159dd6592579d8cf91d37cd6f1826d402f53 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 7 Aug 2024 09:05:11 -0700
Subject: [PATCH] Run test with triple arm64-apple-ios
---
clang/test/Cod
@@ -104,6 +104,7 @@ FEATURE(thread_sanitizer,
LangOpts.Sanitize.has(SanitizerKind::Thread))
FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow))
FEATURE(scudo, LangOpts.Sanitize.hasOneOf(SanitizerKind::Scudo))
FEATURE(ptrauth_intrinsics, LangOpts.Pointer
https://github.com/ahatanak ready_for_review
https://github.com/llvm/llvm-project/pull/100830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -588,12 +588,6 @@ bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager
&CodeGenPasses,
// this also adds codegenerator level optimization passes.
CodeGenFileType CGFT = getCodeGenFileType(Action);
- // Add ObjC ARC final-cleanup optimizations. This is done as pa
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple
%itanium_abi_triple -verify %s -DN=1
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple
%itanium_abi_triple -verify %s -DN=2
+// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple
%i
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple
%itanium_abi_triple -verify %s -DN=1
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple
%itanium_abi_triple -verify %s -DN=2
+// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple
%i
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/100204
>From 4cbbf9ee2c5afaa3818c10ab6f2645353da94a8c Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 23 Jul 2024 11:55:57 -0700
Subject: [PATCH 1/2] [PAC] Define __builtin_ptrauth_type_discriminator
The bui
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++17 -Wno-vla -fsyntax-only
-verify -fptrauth-intrinsics %s
+// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++17 -Wno-vla -fsyntax-only
-verify -fptrauth-intrinsics %s
+
+// RUN: not %clang_cc1 -triple arm64-
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/100204
The builtin computes the discriminator for a type, which can be used to
sign/authenticate function pointers and member function pointers.
If the type passed to the builtin is a C++ member function pointer type
ahatanak wrote:
Do we have to fix this just to appease gcc 9.2? It looks like newer versions of
gcc (after 9.3) don't emit the warning.
https://github.com/llvm/llvm-project/pull/93906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
ahatanak wrote:
Should we use unreachable If it's not possible to suppress the warning from gcc?
https://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations
https://github.com/llvm/llvm-project/pull/99763
__
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/99595
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/99590
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/99595
Use type int as the underlying type when the enum type is incomplete.
>From 14612f84704edbcc3b3bcb20d6e114890e1c3998 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Thu, 18 Jul 2024 17:59:46 -0700
Subject:
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/99590
The function pointer needs to be authenticated before doing the type checks.
>From c44fbc480f8632a178633637010ab6953ed3e50d Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Thu, 18 Jul 2024 16:54:09 -0700
Su
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/98847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/85886
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/85886
>From d39667c7e65c10babb478d8f8d54fecb66d90568 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 19 Mar 2024 15:50:00 -0700
Subject: [PATCH 1/5] [Sema] Don't drop weak_import from a declaration that
foll
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls
-fptrauth-intrinsics -emit-llvm -o-
-fptrauth-function-pointer-type-discrimination | FileCheck %s
ahatanak wrote:
Thanks! Please add a line to test linux after this PR is merged
@@ -351,3 +434,125 @@ CodeGenModule::getVTablePointerAuthInfo(CodeGenFunction
*CGF,
/* IsIsaPointer */ false,
/* AuthenticatesNullValues */ false, Discriminator);
}
+
+llvm::Value *CodeGenFunction::AuthPointerToPointerCast(
@@ -0,0 +1,77 @@
+// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple
arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - |
FileCheck -check-prefix=CHECK -check-prefix=NOPCH %s
ahatanak wrote:
Sorry, I just realized th
@@ -165,6 +166,88 @@ CGPointerAuthInfo
CodeGenModule::getPointerAuthInfoForType(QualType T) {
return ::getPointerAuthInfoForType(*this, T);
}
+static bool isZeroConstant(llvm::Value *value) {
+ if (auto ci = dyn_cast(value))
+return ci->isZero();
+ return false;
+}
+
@@ -165,6 +166,88 @@ CGPointerAuthInfo
CodeGenModule::getPointerAuthInfoForType(QualType T) {
return ::getPointerAuthInfoForType(*this, T);
}
+static bool isZeroConstant(llvm::Value *value) {
+ if (auto ci = dyn_cast(value))
+return ci->isZero();
+ return false;
+}
+
@@ -165,6 +166,88 @@ CGPointerAuthInfo
CodeGenModule::getPointerAuthInfoForType(QualType T) {
return ::getPointerAuthInfoForType(*this, T);
}
+static bool isZeroConstant(llvm::Value *value) {
ahatanak wrote:
I fixed the names of variables and functions add
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const
CGPointerAuthInfo &PointerAuth,
return EmitPointerAuthCommon(*this, PointerAuth, Pointer,
llvm::Intrinsic::ptrauth_auth);
}
+
+llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q
@@ -2373,7 +2373,9 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
DestLV.setTBAAInfo(TBAAAccessInfo::getMayAliasInfo());
return EmitLoadOfLValue(DestLV, CE->getExprLoc());
}
-return Builder.CreateBitCast(Src, DstTy);
+
+llvm::Value *Result =
https://github.com/ahatanak ready_for_review
https://github.com/llvm/llvm-project/pull/98847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/98847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/98847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/96992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/96992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/96992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/96992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3140,6 +3140,269 @@
ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) {
return llvm::getPointerAuthStableSipHash(Str);
}
+/// Encode a function type for use in the discriminator of a function pointer
+/// type. We can't use the itanium scheme
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96992
>From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 26 Jun 2024 13:02:31 -0700
Subject: [PATCH 1/5] [clang] Implement function pointer type discrimination
Giv
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/96944
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96944
>From d21bdaec94a169b27e7f7bace399e77bf99fd572 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 25 Jun 2024 19:37:46 -0700
Subject: [PATCH 1/2] [CodeGen] Add a flag to disable emitting block signature
s
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96992
>From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 26 Jun 2024 13:02:31 -0700
Subject: [PATCH 1/4] [clang] Implement function pointer type discrimination
Giv
@@ -5,55 +5,65 @@
// RUN: -fptrauth-vtable-pointer-address-discrimination \
// RUN: -fptrauth-vtable-pointer-type-discrimination \
// RUN: -fptrauth-init-fini | \
-// RUN: FileCheck %s
--check-prefixes=INTRIN,CALLS,RETS,VPTR_ADDR_DISCR,VPTR_TYPE_DISCR,INITFINI
+// RUN:
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96944
>From d21bdaec94a169b27e7f7bace399e77bf99fd572 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 25 Jun 2024 19:37:46 -0700
Subject: [PATCH 1/2] [CodeGen] Add a flag to disable emitting block signature
s
ahatanak wrote:
Sorry, I didn't remember that I had to set `BLOCK_HAS_SIGNATURE` to 0.
https://github.com/llvm/llvm-project/pull/96944
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant
*ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) {
// The assertions here are all checked by Sema.
assert(Result.Val.isLValue());
+ auto *Base = Result.Val.getLValueBase().get();
+ if (auto *Decl = dyn_cast_or_null(Base
@@ -3140,6 +3140,269 @@
ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) {
return llvm::getPointerAuthStableSipHash(Str);
}
+/// Encode a function type for use in the discriminator of a function pointer
+/// type. We can't use the itanium scheme
@@ -2220,6 +2220,11 @@ llvm::Constant
*ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) {
// The assertions here are all checked by Sema.
assert(Result.Val.isLValue());
+ auto *Base = Result.Val.getLValueBase().get();
+ if (auto *Decl = dyn_cast_or_null(Base
@@ -2220,6 +2220,11 @@ llvm::Constant
*ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) {
// The assertions here are all checked by Sema.
assert(Result.Val.isLValue());
+ auto *Base = Result.Val.getLValueBase().get();
+ if (auto *Decl = dyn_cast_or_null(Base
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96992
>From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 26 Jun 2024 13:02:31 -0700
Subject: [PATCH 1/3] [clang] Implement function pointer type discrimination
Giv
@@ -470,6 +470,9 @@ ENUM_LANGOPT(StrictFlexArraysLevel,
StrictFlexArraysLevelKind, 2,
COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0")
+BENIGN_LANGOPT(FunctionPointerTypeDiscrimination, 1, 0,
ahatanak wrote:
I moved the langopt
@@ -3140,6 +3140,269 @@
ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) {
return llvm::getPointerAuthStableSipHash(Str);
}
+/// Encode a function type for use in the discriminator of a function pointer
+/// type. We can't use the itanium scheme
https://github.com/ahatanak ready_for_review
https://github.com/llvm/llvm-project/pull/96992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96992
>From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Wed, 26 Jun 2024 13:02:31 -0700
Subject: [PATCH 1/2] [clang] Implement function pointer type discrimination
Giv
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/96992
Give users an option to sign a function pointer using a non-zero discrimiantor
based on the type of the destination.
>From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
https://github.com/ahatanak ready_for_review
https://github.com/llvm/llvm-project/pull/96944
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/96944
>From d21bdaec94a169b27e7f7bace399e77bf99fd572 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 25 Jun 2024 19:37:46 -0700
Subject: [PATCH] [CodeGen] Add a flag to disable emitting block signature
strin
https://github.com/ahatanak created
https://github.com/llvm/llvm-project/pull/96944
Users who don't need the signature string to be emitted can use the flag to
reduce code size.
rdar://121933818
>From 5f71f113b27482114904eae8234c6ebc17eef5a4 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/79230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak edited
https://github.com/llvm/llvm-project/pull/79230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/79230
>From 95200f3bb3859738981240a9d8c503a13ede9601 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 16 Jan 2024 13:18:09 -0800
Subject: [PATCH 01/19] Add support for builtin_verbose_trap
The builtin causes
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/79230
>From 95200f3bb3859738981240a9d8c503a13ede9601 Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Tue, 16 Jan 2024 13:18:09 -0800
Subject: [PATCH 01/18] Add support for builtin_verbose_trap
The builtin causes
1 - 100 of 1003 matches
Mail list logo