[PATCH] D132348: [AIX] use the original name as the input to create the new symbol for TLS symbol.

Esme Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 01:39:32 PDT 2022


Esme added a comment.

In D132348#3738746 <https://reviews.llvm.org/D132348#3738746>, @shchenz wrote:

>   @@ -2601,19 +2603,27 @@ void PPCAIXAsmPrinter::emitEndOfAsmFile(Module &M) {
>          SmallString<128> Name;
>          StringRef Prefix = ".";
>          Name += Prefix;
>   -      Name += I.first.first->getName();
>   +      Name += cast<MCSymbolXCOFF>(I.first.first)->getSymbolTableName();
>
> Will this make more sense? I saw for normal global variables, we will use the original symbol name(name in the symbol table) as the input for the symbol for TOC entry. See function `MCSection *TargetLoweringObjectFileXCOFF::getSectionForTOCEntry()`.

Thanks! @shchenz It's much more reasonable than the previous fix. I did not notice that we can get the original name from the symbol table.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132348



More information about the llvm-commits mailing list