[PATCH] D77080: [NFC][XCOFF][AIX] Refactor get/setContainingCsect

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 10:53:01 PDT 2020


jasonliu marked an inline comment as done.
jasonliu added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1609
                 TM));
-  GVSym->setContainingCsect(Csect);
 
----------------
jasonliu wrote:
> DiggerLin wrote:
> > DiggerLin wrote:
> > > I think we still need GVSym->setContainingCsect(Csect) for extern variable . when we emitlLnkage for the extern Variable, the GVSym is not a qualName symbol,  So we get the SMC from GVSym's containningCsect.
> > > 
> > > for example:
> > > extern int b_e;
> > > we need to emit linkage as
> > > .extern  b_e[UA]
> > I think we can change to 
> > if ( GV->isDeclaration()) {
> >   GVSym->setContainingCsect(Csect);
> > }
> Symbol b_e[UA] will have getCsectMCSectionXCOFF returning the csect you want. It's a qualname, so it will have the old "containingCsect", or the new "CsectMCSectionXCOFF".
The GVSym you there better be b_e[UA]. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77080





More information about the llvm-commits mailing list