[PATCH] D97245: [lld-macho] Better deduplication of personality symbols

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 06:50:45 PST 2021


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Woot!



================
Comment at: lld/MachO/UnwindInfoSection.cpp:123
+      if (auto *undefined = dyn_cast<Undefined>(s)) {
         treatUndefinedSymbol(*undefined);
+      } else {
----------------
nit: put a `continue;` here, move code below out of else and dedent (https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code)


================
Comment at: lld/MachO/UnwindInfoSection.cpp:134
+            r.referent = personality;
+          }
+        } else {
----------------
same here, add `continue` here, remove else below


================
Comment at: lld/MachO/UnwindInfoSection.cpp:140
+      }
     } else if (auto *referentIsec = r.referent.dyn_cast<InputSection *>()) {
       // Personality functions can be referenced via section relocations
----------------
same here too: `continue` after handling the dylib symbol, use if without else here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97245



More information about the llvm-commits mailing list