[lld] [lld] Refactor storage of PAuth ABI core info (PR #141920)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 09:22:12 PDT 2025


================
@@ -344,20 +344,22 @@ void GnuPropertySection::writeTo(uint8_t *buf) {
     offset += 16;
   }
 
-  if (!ctx.aarch64PauthAbiCoreInfo.empty()) {
+  if (ctx.aarch64PauthAbiCoreInfo) {
     write32(ctx, buf + offset + 0, GNU_PROPERTY_AARCH64_FEATURE_PAUTH);
-    write32(ctx, buf + offset + 4, ctx.aarch64PauthAbiCoreInfo.size());
-    memcpy(buf + offset + 8, ctx.aarch64PauthAbiCoreInfo.data(),
-           ctx.aarch64PauthAbiCoreInfo.size());
+    write32(ctx, buf + offset + 4, sizeof(uint64_t) * 2);
----------------
sivan-shani wrote:

Added a size() member function for clarity.
Chose not to add a writeTo() method to keep write logic consistent with the existing style in the file.

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


More information about the llvm-commits mailing list