[AIX] Use csect reference for function address constants

SUMMARY:
We currently emit a reference for function address constants as labels;
for example:

foo_ptr:
.long foo
however, there may be no such label in the case where the function is
undefined. Although the label exists when the function is defined, we
will (to be consistent) also use a csect reference in that case.

Address one comment
https://reviews.llvm.org/D71144#inline-653255

Reviewers: daltenty,hubert.reinterpretcast,jasonliu,Xiangling_L
Subscribers: cebowleratibm, wuzish, nemanjai

Differential Revision: https://reviews.llvm.org/D71144
This commit is contained in:
diggerlin 2020-01-06 11:45:00 -05:00
parent 3e1f3b164c
commit 83ec9b51ed
1 changed files with 1 additions and 1 deletions

View File

@ -1776,7 +1776,7 @@ const MCExpr *PPCAIXAsmPrinter::lowerConstant(const Constant *CV) {
MCSectionXCOFF *Csect = OutStreamer->getContext().getXCOFFSection(
FSym->getName(), XCOFF::XMC_DS,
F->isDeclaration() ? XCOFF::XTY_ER : XCOFF::XTY_SD, SC,
SectionKind::getMetadata());
SectionKind::getData());
FSym->setContainingCsect(Csect);
}
return MCSymbolRefExpr::create(