[PATCH] D78929: [AIX][XCOFF]emit extern linkage for the llvm intrinsic symbol

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 08:35:42 PDT 2020


jasonliu added a comment.

It's a bit awkward to use the `emitInstruction` function to record the special functions, as it is actually not doing anything related to "emit instruction".
But I'm not sure if there is any better way to do it if we want to hide the logic in PPCAsmPrinter instead of exposing it in target independent MCContext.
I will see what other people think.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5295
+      const MCSymbolXCOFF *Sym = cast<MCSymbolXCOFF>(
+          Context.getOrCreateSymbol(Twine(".") + Twine(SymName)));
+      SymName = Sym->getName().data();
----------------
Could we have a lambda function to return a MCSymbolXCOFF with the correct name for it? Then replace the similar logic in `getAIXFuncEntryPointSymbolSDNode` with this lambda function call as well.
We should limit the places to do the "." + func_name dance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78929





More information about the llvm-commits mailing list