[PATCH] D107951: [ELF] Handle STO_RISCV_VARIANT_CC

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 4 18:45:48 PST 2022


kito-cheng accepted this revision.
kito-cheng added a comment.
This revision is now accepted and ready to land.

LGTM, thanks for complete the lld part of STO_RISCV_VARIANT_CC !



================
Comment at: lld/ELF/SyntheticSections.cpp:1426-1429
+      if (llvm::find_if(in.relaPlt->relocs, [](const DynamicReloc &r) {
+            return r.type == target->pltRel &&
+                   (r.sym->stOther & STO_RISCV_VARIANT_CC);
+          }) != in.relaPlt->relocs.end())
----------------
nit: Maybe `llvm::any_of`? although use `llvm::_find_if` can archive same purpose, but `any_of` might improve readable here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107951/new/

https://reviews.llvm.org/D107951



More information about the llvm-commits mailing list