[llvm] 83ec9b5 - [AIX] Use csect reference for function address constants
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 08:45:24 PST 2020
Author: diggerlin
Date: 2020-01-06T11:45:00-05:00
New Revision: 83ec9b51ed21b39063f0e0e7b272e66ae57bbcba
URL: https://github.com/llvm/llvm-project/commit/83ec9b51ed21b39063f0e0e7b272e66ae57bbcba
DIFF: https://github.com/llvm/llvm-project/commit/83ec9b51ed21b39063f0e0e7b272e66ae57bbcba.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 31fd7b2b5624..db6271e3b7d9 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -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(
More information about the llvm-commits
mailing list