[PATCH] D70461: [AIX] Emit TOC entries for ASM printing
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 08:05:40 PST 2019
DiggerLin added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1872
+ MCSectionXCOFF *Csect = OutStreamer->getContext().getXCOFFSection(
+ PPCAsmPrinter::getMCSymbolForTOCPseudoMO(MO)->getName(),
+ XCOFF::XMC_UA, XCOFF::XTY_ER,
----------------
instead of PPCAsmPrinter::getMCSymbolForTOCPseudoMO(MO)->getName(),
why not use getSymbol(MO.getGlobal())->getName() directory here ?
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1873
+ PPCAsmPrinter::getMCSymbolForTOCPseudoMO(MO)->getName(),
+ XCOFF::XMC_UA, XCOFF::XTY_ER,
+ TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(GV),
----------------
we create a MCSectionXCOFF which has symbol type "XCOFF::XTY_ER", You have a test case which the external symbol, I just wonder it not hit the assert in the function MCSectionXCOFF construction?
assert((ST == XCOFF::XTY_SD || ST == XCOFF::XTY_CM) &&
"Invalid or unhandled type for csect.");
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70461/new/
https://reviews.llvm.org/D70461
More information about the llvm-commits
mailing list