[PATCH] D78045: [XCOFF][AIX] Fix getSymbol to return the correct qualname when necessary
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 08:21:58 PDT 2020
DiggerLin added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1900
+ ->getQualNameSymbol();
+ if (GOKind.isCommon() || GOKind.isBSSLocal())
+ return cast<MCSectionXCOFF>(SectionForGlobal(GO, GOKind, TM))
----------------
add some thing like to test isBSSLocal by the way ?
@comm_bs = internal global i32 0, align 4
@ps = global i32* @comm_bs, align 4
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1596
MCSymbolXCOFF *GVSym = cast<MCSymbolXCOFF>(getSymbol(GV));
GVSym->setStorageClass(
TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(GV));
----------------
since we get the qualname symbol, I do not think we need to set
GVSym->setStorageClass (....) here.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1603
// since this may not have been set elsewhere depending on how they are used.
MCSectionXCOFF *Csect = cast<MCSectionXCOFF>(
GV->isDeclaration()
----------------
since we have created the MCSectionXCOFF *Csect in the getSymbol.
do we still need this ?
can we change to
if (GVSym->hasRepresentedCsectSet())
Csect = GVSym->getRepresentedCsect()
else {
Csect = getObjFileLowering().SectionForGlobal(
: getObjFileLowering().SectionForGlobal(
GV, GVKind = getObjFileLowering().getKindForGlobal(GV, TM),
}
?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78045/new/
https://reviews.llvm.org/D78045
More information about the llvm-commits
mailing list