[PATCH] D118903: [lld-macho] Have relocation address included in range-check error message

Roger Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 14:42:10 PST 2022


Roger accepted this revision.
Roger added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/MachO/Relocations.cpp:66-67
+    assert(osecIdx > 0);
+    // We should be only calling this function on offsets that belong to
+    // ConcatOutputSections.
+    if (!isa<ConcatOutputSection>(sections[osecIdx - 1]))
----------------
If calling this function on an offset that doesn't belong to a ConcatOutputSection should not be happening, should we be add an assert to enforce this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118903



More information about the llvm-commits mailing list