[PATCH] D144999: [RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 09:09:19 PDT 2023


int3 added inline comments.


================
Comment at: lld/MachO/UnwindInfoSection.cpp:364
       cu.encoding = target->modeDwarfEncoding | d->unwindEntry->outSecOff;
-      const FDE &fde = cast<ObjFile>(d->getFile())->fdes[d->unwindEntry];
       cu.functionLength = fde.funcLength;
----------------
seems like this was accidentally deleted?


================
Comment at: lld/MachO/UnwindInfoSection.cpp:366
+      cu.personality = nullptr;
       cu.lsda = fde.lsda;
       return;
----------------
if we're not setting the personality, maybe the LSDA pointer isn't necessary either?


================
Comment at: lld/test/MachO/compact-unwind-both-local-and-dylib-personality.s:1
-## Tests that lld-macho can handle the case where personality symbols with the same name
+>## Tests that lld-macho can handle the case where personality symbols with the same name
 ## are both from a dylib and locally defined in an object file.
----------------
stray `>`


================
Comment at: llvm/lib/MC/MCAsmBackend.cpp:122
+    StringRef name = Sym->getName();
+    return name.compare("__gxx_personality_v0,") == 0 ||
+           name.compare("__objc_personality_v0") == 0;
----------------
wonder why the test didn't catch this

also couldn't this be a regular `==` string compare?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144999



More information about the llvm-commits mailing list