diff options
author | Oliver Hunt <oliver@apple.com> | 2025-06-16 22:49:45 +0300 |
---|---|---|
committer | Oliver Hunt <oliver@apple.com> | 2025-06-16 22:49:45 +0300 |
commit | d235f85583f1fd38f13d39a4f5be2d9e6d850ca8 (patch) | |
tree | 24fd06912a7587f17e1833de72b97d15d6e4c83e | |
parent | b43a7e9295dfdbe0a11fb7dff669b82d8ed0630c (diff) | |
download | llvm-users/ojhunt/ptrauth-vs-trivial-relocation-codegen.zip llvm-users/ojhunt/ptrauth-vs-trivial-relocation-codegen.tar.gz llvm-users/ojhunt/ptrauth-vs-trivial-relocation-codegen.tar.bz2 |
Remove some debugging logic in the testusers/ojhunt/ptrauth-vs-trivial-relocation-codegen
-rw-r--r-- | clang/lib/CodeGen/CGPointerAuth.cpp | 11 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/cxx2c-trivially-relocatable-ptrauth.cpp | 8 |
2 files changed, 4 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGPointerAuth.cpp b/clang/lib/CodeGen/CGPointerAuth.cpp index 9ccfcb3..bbfc19c 100644 --- a/clang/lib/CodeGen/CGPointerAuth.cpp +++ b/clang/lib/CodeGen/CGPointerAuth.cpp @@ -520,13 +520,12 @@ void CodeGenFunction::EmitSingleObjectPointerAuthRelocationFixup( const FixupVectorTy &Fixups, QualType ElementType, Address Dst, Address Src) { auto GetFixupAddress = [&](Address BaseAddress, CharUnits Offset, - KnownNonNull_t IsKnownNonNull, - const char *Reason) { + KnownNonNull_t IsKnownNonNull) { llvm::Value *BasePtr = BaseAddress.emitRawPointer(*this); llvm::Value *OffsetValue = llvm::ConstantInt::get(PtrDiffTy, Offset.getQuantity()); llvm::Value *FixupAddress = - Builder.CreateInBoundsGEP(Int8Ty, BasePtr, OffsetValue, Reason); + Builder.CreateInBoundsGEP(Int8Ty, BasePtr, OffsetValue); return Address(FixupAddress, VoidPtrPtrTy, BaseAddress.getAlignment().alignmentAtOffset(Offset), IsKnownNonNull); @@ -542,12 +541,10 @@ void CodeGenFunction::EmitSingleObjectPointerAuthRelocationFixup( // We don't use the existing copy helpers as we'll be resigning a // value in place assuming the old address for the read. - Address FixupDst = GetFixupAddress(Dst, Fixup.Offset, IsKnownNonNull, - "fixup.dst.with.offset"); + Address FixupDst = GetFixupAddress(Dst, Fixup.Offset, IsKnownNonNull); CGPointerAuthInfo DstPtrAuth = EmitPointerAuthInfo(Qualifier, FixupDst); - Address FixupSrc = GetFixupAddress(Src, Fixup.Offset, IsKnownNonNull, - "fixup.src.with.offset"); + Address FixupSrc = GetFixupAddress(Src, Fixup.Offset, IsKnownNonNull); CGPointerAuthInfo SrcPtrAuth = EmitPointerAuthInfo(Qualifier, FixupSrc); // We're loading from the destination here as we've already performed the diff --git a/clang/test/CodeGenCXX/cxx2c-trivially-relocatable-ptrauth.cpp b/clang/test/CodeGenCXX/cxx2c-trivially-relocatable-ptrauth.cpp index e838581..168d9ea 100644 --- a/clang/test/CodeGenCXX/cxx2c-trivially-relocatable-ptrauth.cpp +++ b/clang/test/CodeGenCXX/cxx2c-trivially-relocatable-ptrauth.cpp @@ -2,15 +2,7 @@ typedef __SIZE_TYPE__ size_t; - -#if 1 #define vtable_ptrauth(...) [[clang::ptrauth_vtable_pointer(__VA_ARGS__)]] - -#else -#define vtable_ptrauth(...) -#define __ptrauth(...) -#endif - #define ADDR_AND_TYPE_DISC vtable_ptrauth(process_independent, address_discrimination, type_discrimination) #define TYPE_DISC_ONLY vtable_ptrauth(process_independent, no_address_discrimination, type_discrimination) |