[llvm] [IR][AArch64] Add "ptrauth(...)" Constant to represent signed pointers. (PR #85738)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 04:14:32 PDT 2024
================
@@ -3596,6 +3609,21 @@ Error BitcodeReader::parseConstants() {
Record[1]);
break;
}
+ case bitc::CST_CODE_SIGNED_PTR: {
+ if (Record.size() < 6)
+ return error("Invalid record");
+ Type *PtrTy = getTypeByID(Record[0]);
+ if (!PtrTy)
+ return error("Invalid record");
+
+ // PtrTy, Ptr, Key, AddrDiscTy, AddrDisc, Disc
+ V = BitcodeConstant::create(
+ Alloc, CurTy, BitcodeConstant::ConstantPtrAuthOpcode,
+ {(unsigned)Record[1], (unsigned)Record[2], (unsigned)Record[4],
+ (unsigned)Record[5]});
----------------
nikic wrote:
Why does this skip over `Record[3]`?
https://github.com/llvm/llvm-project/pull/85738
More information about the llvm-commits
mailing list