[PATCH] D78045: [XCOFF][AIX] Fix getSymbol to return the correct qualname when necessary

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 08:54:48 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1891
+  // It is inherently ambiguous when the GO represents the address of a
+  // function, as the GO could either represents a function descriptor or a
+  // function entry point. We choose to always return a function descriptor
----------------
s/represents/represent/;


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1614
       OutStreamer->emitXCOFFLocalCommonSymbol(
-          GVSym, Size, Csect->getQualNameSymbol(), Align);
+          OutContext.getOrCreateSymbol(GVSym->getUnqualifiedName()), Size,
+          GVSym, Align);
----------------
DiggerLin wrote:
> since we have a qualname symbol, I do not think we need to create and unnecessary  UnqualifiedName symbol.
> maybe we change change the interface of emitXCOFFLocalCommonSymbol. I do not think we need to pass two Symbols(MCSymbol *LabelSym,  and  MCSymbol *CsectSym) in the emitXCOFFLocalCommonSymbol.
The label does not have to be given linkage, but it is not optional in the assembly syntax.


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

https://reviews.llvm.org/D78045





More information about the llvm-commits mailing list