[PATCH] D104169: [lld-macho][nfc] Put back shouldOmitFromOutput() asserts

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 09:41:03 PDT 2021


thakis added inline comments.


================
Comment at: lld/MachO/MapFile.cpp:69
+          if (d->isLive() && d->isec && d->getFile() == file) {
+            assert(!shouldOmitFromOutput(d->isec));
             v.push_back(d);
----------------
(this used to check coalescedWeak() because it's in a `!isLive()` check and then `shouldOmit` is just `isCoalesced`, but this is fine as-is too)


================
Comment at: lld/MachO/UnwindInfoSection.cpp:177
     if (auto *referentIsec = r.referent.dyn_cast<InputSection *>()) {
+      assert(!shouldOmitFromOutput(referentIsec));
       // Personality functions can be referenced via section relocations
----------------
Hm, is this correct? See the FIXME at the start of the loop. It's correct to assert that this isn't a coalesced weak, but it might be a non-live symbol I think. (But not sure.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104169



More information about the llvm-commits mailing list