https://github.com/kovdan01 edited
https://github.com/llvm/llvm-project/pull/93906
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
@@ -3041,3 +3046,20 @@ llvm::Value
*CodeGenFunction::emitBoolVecConversion(llvm::Value *SrcVec,
return Builder.CreateShuffleVector(SrcVec, ShuffleMask, Name);
}
+
+void CodeGenFunction::EmitPointerAuthOperandBundle(
+const CGPointerAuthInfo &pointerAuth,
+SmallVecto
@@ -104,10 +109,13 @@ class CGCallee {
/// Construct a callee. Call this constructor directly when this
/// isn't a direct call.
- CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
+ CGCallee(
+ const CGCalleeInfo &abstractInfo, llvm::Value *func
@@ -3041,3 +3046,20 @@ llvm::Value
*CodeGenFunction::emitBoolVecConversion(llvm::Value *SrcVec,
return Builder.CreateShuffleVector(SrcVec, ShuffleMask, Name);
}
+
+void CodeGenFunction::EmitPointerAuthOperandBundle(
kovdan01 wrote:
`PascalCase` for variabl
@@ -75,3 +93,36 @@ CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
return CGM.getConstantSignedPointer(pointer, key, storageAddress,
otherDiscriminator);
}
+
+/// If applicable, sign a given constant function pointer with the ABI ru
@@ -26,6 +26,7 @@
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/NoSanitizeList.h"
+#include "clang/Basic/PointerAuthOptions.h"
kovdan01 wrote:
This include looks unneeded since further forward declaration `class
Po
@@ -75,3 +93,36 @@ CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
return CGM.getConstantSignedPointer(pointer, key, storageAddress,
otherDiscriminator);
}
+
+/// If applicable, sign a given constant function pointer with the ABI ru
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
@@ -28,6 +28,24 @@
using namespace clang;
using namespace CodeGen;
+/// Return the abstract pointer authentication schema for a pointer to the
given
+/// function type.
+CGPointerAuthInfo CodeGenModule::getFunctionPointerAuthInfo(QualType T) {
+ auto &Schema = getCodeGenOpts
https://github.com/kovdan01 requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/93906
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
@@ -351,6 +351,9 @@ def err_drv_omp_host_ir_file_not_found : Error<
"target regions but cannot be found">;
def err_drv_omp_host_target_not_supported : Error<
"target '%0' is not a supported OpenMP host target">;
+def err_drv_ptrauth_not_supported : Error<
+ "target '%0' do
@@ -1086,8 +1086,9 @@ static void genTargetDataClauses(
// ordering.
// TODO: Perhaps create a user provideable compiler option that will
// re-introduce a hard-error rather than a warning in these cases.
- promoteNonCPtrUseDevicePtrArgsToUseDeviceAddr(clauseOps, useDevi
tblah wrote:
> @tblah thanks for giving this a look. Basically the issue here with the
> reduction clause is that its description is currently different for each
> operation that accepts it.
> It would be great to agree on a generic description for that clause that
> would work for all ops,
https://github.com/tblah approved this pull request.
LGTM, but please wait for another reviewer
https://github.com/llvm/llvm-project/pull/92523
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/92523
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/kovdan01 edited
https://github.com/llvm/llvm-project/pull/93904
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1856,6 +1856,12 @@ class ConstantLValueEmitter : public
ConstStmtVisitor
kovdan01 wrote:
>From the function prototype, it's unclear that the first element of the pair
>stands for `StorageAddress` and the second one - for `OtherDiscriminator`.
>Consider add
@@ -0,0 +1,63 @@
+//===--- CGPointerAuth.cpp - IR generation for pointer authentication
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/kovdan01 requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/93904
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) {
}
}
+ConstantLValue
+ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) {
+ llvm::Constant *UnsignedPointer = emitPointerAuthPointer(E->getArg(0));
+ unsigned Key = emitPoin
@@ -0,0 +1,46 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -0,0 +1,233 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/kovdan01 edited
https://github.com/llvm/llvm-project/pull/93904
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/kparzysz updated
https://github.com/llvm/llvm-project/pull/94689
>From 64fcf25e2158de44bccf725a0f91d8228b7cb7a5 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek
Date: Thu, 6 Jun 2024 15:10:13 -0500
Subject: [PATCH 1/3] [Frontend] Introduce `getDirectiveCategory` for ACC/OMP
EricWF wrote:
After implementing a version myself, I think there's a bunch of unneeded
complexity in this type.
I compared the two implementations on a personal compiler-explorer which is set
up to compare libc++ patches (I'm working to provide to other developers).
The use of `__libcpp_alloca
@@ -0,0 +1,46 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/EricWF requested changes to this pull request.
Please see the previous comment for the requested changes.
https://github.com/llvm/llvm-project/pull/94670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https:/
EricWF wrote:
Oh, I just noticed there are no tests for exception safety. Could you please
add some throwing types? (Or perhaps I just missed those tests?).
Currently this code terminates:
```
#include
#include
struct ThrowsOnConstruct {
explicit ThrowsOnConstruct(int x) : value(x) { if (x
philnik777 wrote:
@EricWF When switching to `__libcpp_operator_{new,delete}` everything gets
compiled exactly the same on my system. Could you disclose which test you used
for this code? You also claim that the `__pointer_int_pair` causes the
optimizer to lose track of the function pointer cau
@@ -2126,14 +2219,16 @@ static ExprResult PointerAuthSignGenericData(Sema &S,
CallExpr *Call) {
}
static ExprResult PointerAuthSignOrAuth(Sema &S, CallExpr *Call,
-PointerAuthOpKind OpKind) {
+Poi
@@ -0,0 +1,233 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/clementval created
https://github.com/llvm/llvm-project/pull/94771
This is a follow up patch to #94652 and handles the lowering of the reduce
intrinsic with DIM argument and non scalar result.
>From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001
From: Val
llvmbot wrote:
@llvm/pr-subscribers-flang-fir-hlfir
Author: Valentin Clement (バレンタイン クレメン) (clementval)
Changes
This is a follow up patch to #94652 and handles the lowering of the
reduce intrinsic with DIM argument and non scalar result.
---
Full diff: https://github.com/llvm/llvm-proje
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 {
}
};
+/// Placeholder for Dim complex(10) version of Reduce Intrinsic
+struct ForcedReduceComplex10Dim {
+ static constexpr const char *name =
+ ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim));
+ static constexpr f
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 {
}
};
+/// Placeholder for Dim complex(10) version of Reduce Intrinsic
+struct ForcedReduceComplex10Dim {
+ static constexpr const char *name =
+ ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim));
+ static constexpr f
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 {
}
};
+/// Placeholder for Dim complex(10) version of Reduce Intrinsic
+struct ForcedReduceComplex10Dim {
+ static constexpr const char *name =
+ ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim));
+ static constexpr f
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To:
https://github.com/clementval updated
https://github.com/llvm/llvm-project/pull/94771
>From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001
From: Valentin Clement
Date: Thu, 6 Jun 2024 14:17:44 -0700
Subject
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase {
/// space.
QualType removeAddrSpaceQualType(QualType T) const;
+ /// Return the "other" type-specific discriminator for the given type.
ojhunt wrote:
@asl thoughts?
https://github.com/llv
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase {
/// space.
QualType removeAddrSpaceQualType(QualType T) const;
+ /// Return the "other" type-specific discriminator for the given type.
ojhunt wrote:
How would `/// Return the "other" disc
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase {
/// space.
QualType removeAddrSpaceQualType(QualType T) const;
+ /// Return the "other" type-specific discriminator for the given type.
asl wrote:
@ojhunt This looks much better, thanks!
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=
Message-ID:
In-Reply-To:
@@ -540,9 +606,31 @@ struct ForcedReduceComplex16 {
auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
auto r
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To:
@@ -540,9 +606,31 @@ struct ForcedReduceComplex16 {
auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
auto refT
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To:
@@ -540,9 +606,31 @@ struct ForcedReduceComplex16 {
auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
auto refT
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To:
@@ -540,9 +606,31 @@ struct ForcedReduceComplex16 {
auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
auto refT
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To:
@@ -540,9 +606,31 @@ struct ForcedReduceComplex16 {
auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
auto refT
https://github.com/huixie90 edited
https://github.com/llvm/llvm-project/pull/94670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,233 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
ojhunt wrote:
Had to do a force push to resolve merge conflicts following @ahatanak's PR, so
this change now includes `CodeGenFunction::EmitPointerAuthAuth` etc
https://github.com/llvm/llvm-project/pull/94056
___
llvm-branch-commits mailing list
llvm-
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To:
@@ -540,9 +606,31 @@ struct ForcedReduceComplex16 {
auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
auto refT
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement
Message-ID:
In-Reply-To:
https://github.com/clementval updated
https://github.com/llvm/llvm-project/pull/94771
>From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001
From: Valentin Clement
Date: Thu, 6 Jun 2024 1
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement
Message-ID:
In-Reply-To:
clementval wrote:
Thanks Slava and Jean for the review! I fixed the mismatch in
`ForcedReduceComplex16` and `ForcedReduceComplex16Dim`. Thanks Slava for
catching that.
https://github.com/llvm/llvm-proje
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Valentin Clement
Message-ID:
In-Reply-To:
https://github.com/vzakhari approved this pull request.
Thank you, Valentin!
https://github.com/llvm/llvm-project/pull/94771
___
llvm-branch-commits mailing lis
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Valentin Clement
Message-ID:
In-Reply-To:
https://github.com/jeanPerier approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/94771
___
llvm-branch-commits mailing list
llvm-branch-
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement
Message-ID:
In-Reply-To:
jeanPerier wrote:
Beware that the windows failure seems related to this change or the previous
one:
```
C:\ws\src\flang\lib\Optimizer\Builder\Runtime\Reduction.cpp(1499): error C2065:
'_FortranAReduceRea
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement
Message-ID:
In-Reply-To:
clementval wrote:
> Beware that the windows failure seems related to this change or the previous
> one:
>
> ```
>
> C:\ws\src\flang\lib\Optimizer\Builder\Runtime\Reduction.cpp(1499): error
> C2065: '_F
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Valentin Clement
,Valentin Clement
Message-ID:
In-Reply-To:
https://github.com/clementval updated
https://github.com/llvm/llvm-project/pull/94771
>From fd911977863888c7c005f00ae05049b32fe9d4d6 Mon Sep 17 00:00:00 2001
From: Valentin Clement
Date:
https://github.com/asl approved this pull request.
https://github.com/llvm/llvm-project/pull/93902
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
asl wrote:
So, regarding big-endian things. Original siphash is always "little-endian"
regardless of the host platform. On big endian hosts it essentially does byte
swap in the end. We do not have it here, so we will end with different hashes
on platforms with different endianness.
>From the
@@ -15,6 +15,29 @@ typedef enum {
ptrauth_key_asib = 1,
ptrauth_key_asda = 2,
ptrauth_key_asdb = 3,
+
+#ifdef __APPLE__
asl wrote:
Looks like this is something from already merged commit. Worth rebasing?
https://github.com/llvm/llvm-project/pull/93903
_
Author: Daniil Kovalev
Date: 2024-06-08T09:21:11+03:00
New Revision: acb7210fdeaf3ddf80e28cfc0e1faefc939478cf
URL:
https://github.com/llvm/llvm-project/commit/acb7210fdeaf3ddf80e28cfc0e1faefc939478cf
DIFF:
https://github.com/llvm/llvm-project/commit/acb7210fdeaf3ddf80e28cfc0e1faefc939478cf.diff
@@ -47,6 +47,17 @@ void test_blend_discriminator(int *dp, int (*fp)(int), int
value) {
float *mismatch = __builtin_ptrauth_blend_discriminator(dp, value); //
expected-error {{incompatible integer to pointer conversion initializing 'float
*' with an expression of type}}
}
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93903
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -162,20 +162,27 @@ struct ThunkInfo {
/// Holds a pointer to the overridden method this thunk is for,
/// if needed by the ABI to distinguish different thunks with equal
- /// adjustments. Otherwise, null.
+ /// adjustments.
+ /// In the Itanium ABI, this field can h
@@ -3088,6 +3089,17 @@ QualType ASTContext::removeAddrSpaceQualType(QualType T)
const {
return QualType(TypeNode, Quals.getFastQualifiers());
}
+uint16_t ASTContext::getPointerAuthVTablePointerDiscriminator(
+const CXXRecordDecl *record) {
+ assert(record->isPolymorp
@@ -7037,8 +7036,64 @@ void ItaniumMangleContextImpl::mangleCXXDtorComdat(const
CXXDestructorDecl *D,
Mangler.mangle(GlobalDecl(D, Dtor_Comdat));
}
+static void mangleOverrideDiscrimination(CXXNameMangler &mangler,
+ ASTContext &conte
@@ -7064,21 +7119,29 @@ void ItaniumMangleContextImpl::mangleThunk(const
CXXMethodDecl *MD,
Thunk.Return.Virtual.Itanium.VBaseOffsetOffset);
Mangler.mangleFunctionEncoding(MD);
+ if (!elideOverrideInfo) {
+mangleOverrideDiscrimination(Mangl
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -3094,9 +3188,10 @@ void VFTableBuilder::AddMethods(BaseSubobject Base,
unsigned BaseDepth,
ReturnAdjustmentOffset.VirtualBase);
}
}
-
+auto thisType = (OverriddenMD ? OverriddenMD :
MD)->getThisType().getTypePtr();
---
@@ -3094,9 +3188,10 @@ void VFTableBuilder::AddMethods(BaseSubobject Base,
unsigned BaseDepth,
ReturnAdjustmentOffset.VirtualBase);
}
}
-
+auto thisType = (OverriddenMD ? OverriddenMD :
MD)->getThisType().getTypePtr();
Ad
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr
&Vptr) {
// the same addr space. Note that this might not be LLVM address space 0.
VTableField = VTableField.withElementType(PtrTy);
+ if (auto authenticationInfo = CGM.getVTablePointerAuthIn
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr
&Vptr) {
// the same addr space. Note that this might not be LLVM address space 0.
VTableField = VTableField.withElementType(PtrTy);
+ if (auto authenticationInfo = CGM.getVTablePointerAuthIn
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const
CXXRecordDecl *RD) {
llvm::Value *CodeGenFunction::GetVTablePtr(Address This,
llvm::Type *VTableTy,
- const CXXRec
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const
CXXRecordDecl *RD) {
llvm::Value *CodeGenFunction::GetVTablePtr(Address This,
llvm::Type *VTableTy,
- const CXXRec
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const
CXXRecordDecl *RD) {
llvm::Value *CodeGenFunction::GetVTablePtr(Address This,
llvm::Type *VTableTy,
- const CXXRec
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const
CXXRecordDecl *RD) {
llvm::Value *CodeGenFunction::GetVTablePtr(Address This,
llvm::Type *VTableTy,
- const CXXRec
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const
CXXRecordDecl *RD) {
llvm::Value *CodeGenFunction::GetVTablePtr(Address This,
llvm::Type *VTableTy,
- const CXXRec
@@ -803,6 +803,14 @@ bool ConstStructBuilder::Build(const APValue &Val, const
RecordDecl *RD,
llvm::Constant *VTableAddressPoint =
CGM.getCXXABI().getVTableAddressPoint(BaseSubobject(CD, Offset),
VTableClass);
+
@@ -803,6 +803,14 @@ bool ConstStructBuilder::Build(const APValue &Val, const
RecordDecl *RD,
llvm::Constant *VTableAddressPoint =
CGM.getCXXABI().getVTableAddressPoint(BaseSubobject(CD, Offset),
VTableClass);
+
@@ -23,11 +23,53 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/IR/ValueMap.h"
#include "llvm/Analysis/ValueTracking.h"
+#include "llvm/Support/SipHash.h"
#include
using namespace clang;
using namespace CodeGen;
+/// Given a pointer-authentication schema, return a con
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr(
VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange);
+ if (auto &schema =
asl wrote:
`
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr(
VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange);
+ if (auto &schema =
+ CGM.getCodeGenOp
@@ -219,8 +219,10 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn,
"Store of this should be in entry block?");
// Adjust "this", if necessary.
Builder.SetInsertPoint(&*ThisStore);
- llvm::Value *AdjustedThisPtr =
- CGM.getCXXABI().performThisAdjus
@@ -219,8 +219,10 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn,
"Store of this should be in entry block?");
// Adjust "this", if necessary.
Builder.SetInsertPoint(&*ThisStore);
- llvm::Value *AdjustedThisPtr =
- CGM.getCXXABI().performThisAdjus
@@ -307,10 +309,15 @@ void
CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee,
const CXXMethodDecl *MD = cast(CurGD.getDecl());
// Adjust the 'this' pointer if necessary
+ const CXXRecordDecl *thisValueClass =
asl wrote:
```suggestio
@@ -307,10 +309,15 @@ void
CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee,
const CXXMethodDecl *MD = cast(CurGD.getDecl());
// Adjust the 'this' pointer if necessary
+ const CXXRecordDecl *thisValueClass =
+ MD->getThisType()->getPointeeCXXRe
@@ -307,10 +309,15 @@ void
CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee,
const CXXMethodDecl *MD = cast(CurGD.getDecl());
// Adjust the 'this' pointer if necessary
+ const CXXRecordDecl *thisValueClass =
+ MD->getThisType()->getPointeeCXXRe
92 matches
Mail list logo