[PATCH] D152540: [MC][MachO]Do not emit DWARF for no-personality case
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 11:23:24 PDT 2023
jyknight added inline comments.
================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp:572
return CU::UNWIND_ARM64_MODE_FRAMELESS;
- if (!isDarwinCanonicalPersonality(FI->Personality) &&
+ if (FI->Personality && !isDarwinCanonicalPersonality(FI->Personality) &&
!Ctxt->emitCompactUnwindNonCanonical())
----------------
oontvoo wrote:
> jyknight wrote:
> > Move the change into the isDarwinCanonicalPersonality function?
> well, both of these two predicates are *already* in the function. (it is supposed to tell you if a given symbol is a canonical-darwin personality.)
> BUT if it returns false, then it could be any of the following reason:
> - (1) the symbol is NULL
> - (2) the symbol is NOT MachO
> - (3) the symbol is NOT canonical personality symbol.
>
> We only want to return DWARF-MODE here for reason number (3)
>
> If we want to reuse a util function, then we ought to name it `isNonNullDarwinNonCanonicalPersonality`...
> That's a bit hard to read.
I'd say the util function should return true for NULL, because NULL is a canonical personality (it's always given index 0, right?)
How do you even get a !MachO symbol in here -- all of this is Mach-O-specific, right? Perhaps can just remove that clause?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152540/new/
https://reviews.llvm.org/D152540
More information about the llvm-commits
mailing list