[llvm] [PowerPC] Function descriptor symbol can be omitted for external symbol. (PR #97526)

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 7 18:04:48 PDT 2024


================
@@ -2325,8 +2325,10 @@ 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.
----------------
chenzheng1030 wrote:

nit: we can change the comment a little bit here like "if function's address is taken, means it may be called via a function pointer, we need the function descriptor for it."

https://github.com/llvm/llvm-project/pull/97526


More information about the llvm-commits mailing list