[llvm] [PowerPC] Function descriptor symbol can be omitted for external symbol. (PR #97526)
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 06:06:58 PDT 2024
================
@@ -2325,8 +2325,15 @@ bool AsmPrinter::doFinalization(Module &M) {
// Emit linkage for the function entry point.
emitLinkage(&F, FnEntryPointSym);
- // Emit linkage for the function descriptor.
- emitLinkage(&F, Name);
+ // If address is taken from an extern function, we need to emit linkage for
+ // its function descriptor symbol.
+ if (F.hasAddressTaken(/*PutOffender=*/nullptr,
+ /*IgnoreCallbackUses=*/false,
+ /*IgnoreAssumeLikeCalls=*/true,
+ /*IgnoreLLVMUsed=*/true,
+ /*IgnoreARCAttachedCall=*/false,
+ /*IgnoreCastedDirectCall=*/true))
----------------
chenzheng1030 wrote:
Since you change the default values for parameters `IgnoreLLVMUsed` and `IgnoreCastedDirectCall`, would you please share the C or C++ cases where function declarations are used like these two types? Thanks.
https://github.com/llvm/llvm-project/pull/97526
More information about the llvm-commits
mailing list