[llvm-branch-commits] Add pointer field protection feature. (PR #133538)
Oliver Hunt via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 14 17:27:28 PDT 2025
================
@@ -1415,6 +1469,52 @@ void CodeGenFunction::CreateCoercedStore(llvm::Value *Src, Address Dst,
}
}
+ // Coercion directly through memory does not work if the structure has pointer
+ // field protection because the struct passed by value has a different bit
+ // pattern to the struct in memory, so we must read the elements one by one
+ // and use them to form the coerced structure.
+ std::vector<PFPField> PFPFields;
+ getContext().findPFPFields(SrcFETy, CharUnits::Zero(), PFPFields, true);
----------------
ojhunt wrote:
Same as for CoercedLoad :D
https://github.com/llvm/llvm-project/pull/133538
More information about the llvm-branch-commits
mailing list