[clang] [PAC] Implement function pointer re-signing (PR #98847)

Anatoly Trosinenko via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 04:12:57 PDT 2024


================
@@ -192,14 +215,18 @@ class Address {
   /// Return the IR name of the pointer value.
   llvm::StringRef getName() const { return Pointer.getPointer()->getName(); }
 
+  const CGPointerAuthInfo &getPointerAuthInfo() const { return PtrAuthInfo; }
+  void setPointerAuthInfo(const CGPointerAuthInfo &Info) { PtrAuthInfo = Info; }
+
   // This function is called only in CGBuilderBaseTy::CreateElementBitCast.
   void setElementType(llvm::Type *Ty) {
     assert(hasOffset() &&
            "this funcion shouldn't be called when there is no offset");
     ElementType = Ty;
   }
 
-  /// Whether the pointer is known not to be null.
+  bool isSigned() const { return PtrAuthInfo.isSigned(); }
+
   KnownNonNull_t isKnownNonNull() const {
----------------
atrosinenko wrote:

Lost function comment - I guess it was unintentional.

https://github.com/llvm/llvm-project/pull/98847


More information about the cfe-commits mailing list