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

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 18:42:55 PST 2022


int3 added inline comments.


================
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]))
----------------
Roger wrote:
> 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?
yeah fair. I'll just delete this check, the `cast<>` below itself contains an assert


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