[PATCH] D152540: [MC][MachO]Do not emit DWARF for no-personality case
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 10:51:08 PDT 2023
oontvoo 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())
----------------
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.
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