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

Vy Nguyen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 10:41:41 PDT 2023


oontvoo marked an inline comment as done.
oontvoo added a comment.

In D144999#4319964 <https://reviews.llvm.org/D144999#4319964>, @jyknight wrote:

> I wonder if we actually need to define a clang frontend flag for this; I suspect nobody will ever want to specify it, since the only non-canonical personality clang will ever generate that changes behavior is the pure-C destructor-only personality, `__gnu_personality_v0`. Otherwise, it could only arise from assembly or IR.
>
> For a test-case, can just use `-mllvm -emit-compact-unwind-non-canonical`.

Per offline discussion, passing it via `-mllvm` doesn't work because  llvm-flags that populate MCTargetOptions flags aren't registered in Clang, so it needs to be at least a clang cc1 option.



================
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;
----------------
int3 wrote:
> seems like this was accidentally deleted?
yes - good catch


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144999



More information about the cfe-commits mailing list