================
@@ -165,11 +165,17 @@ void 
BinarySection::flushPendingRelocations(raw_pwrite_stream &OS,
     OS.pwrite(Patch.Bytes.data(), Patch.Bytes.size(),
               SectionFileOffset + Patch.Offset);
 
+  uint64_t SkippedPendingRelocations = 0;
   for (Relocation &Reloc : PendingRelocations) {
     uint64_t Value = Reloc.Addend;
     if (Reloc.Symbol)
       Value += Resolver(Reloc.Symbol);
 
+    if (!Relocation::canEncodeValue(Reloc.Type, Value,
----------------
paschalis-mpeis wrote:

`addPendingRelocation` now becomes the only way now to add a pending relocation 
(Parent PR #123635). If it comes from the `scanExternalRefs` optimization, then 
it is marked as optional. Finally, those relocations can be safely skipped when 
it's time to flush them.

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

Reply via email to