================
@@ -1877,6 +1946,32 @@ inline Registers_arm64::Registers_arm64(const void 
*registers) {
   memcpy(_vectorHalfRegisters,
          static_cast<const uint8_t *>(registers) + sizeof(GPRs),
          sizeof(_vectorHalfRegisters));
+#if __has_feature(ptrauth_calls)
+  uint64_t pcRegister = 0;
+  memcpy(&pcRegister, ((uint8_t *)&_registers) + offsetof(GPRs, __pc),
+         sizeof(pcRegister));
+  setIP(pcRegister);
+  uint64_t fpRegister = 0;
+  memcpy(&fpRegister, ((uint8_t *)&_registers) + offsetof(GPRs, __fp),
+         sizeof(fpRegister));
+  setFP(fpRegister);
+#endif
+}
+
+inline Registers_arm64::Registers_arm64(const Registers_arm64 &other) {
----------------
kovdan01 wrote:

Declarations of these copy constructor and corresponding copy assignment 
operator are missing in the class body, so this basically does not seem to 
compile (at least I was unable to do that :) ). BTW, are these actually used 
somewhere?

https://github.com/llvm/llvm-project/pull/143230
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to