aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-11 18:37:24 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-07 23:04:39 +0000
commitbbb0bdafca9e4b69db37b55d6d5a485ae342787c (patch)
tree03f175959386b43b89d2b806b54a39697bbcfcb1 /contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent0e1e0ce556810ad5f9d45485e686f0653530516c (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 3994552884c4..55fb522554fa 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -2426,23 +2426,6 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
Name, Kind, XCOFF::CsectProperties(SMC, XCOFF::XTY_CM));
}
- if (Kind.isMergeableCString()) {
- Align Alignment = GO->getParent()->getDataLayout().getPreferredAlign(
- cast<GlobalVariable>(GO));
-
- unsigned EntrySize = getEntrySizeForKind(Kind);
- std::string SizeSpec = ".rodata.str" + utostr(EntrySize) + ".";
- SmallString<128> Name;
- Name = SizeSpec + utostr(Alignment.value());
-
- if (TM.getDataSections())
- getNameWithPrefix(Name, GO, TM);
-
- return getContext().getXCOFFSection(
- Name, Kind, XCOFF::CsectProperties(XCOFF::XMC_RO, XCOFF::XTY_SD),
- /* MultiSymbolsAllowed*/ !TM.getDataSections());
- }
-
if (Kind.isText()) {
if (TM.getFunctionSections()) {
return cast<MCSymbolXCOFF>(getFunctionEntryPointSymbol(GO, TM))
@@ -2628,12 +2611,12 @@ MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(
// function entry point csect instead. And for function delcarations, the
// undefined symbols gets treated as csect with XTY_ER property.
if (((TM.getFunctionSections() && !Func->hasSection()) ||
- Func->isDeclaration()) &&
+ Func->isDeclarationForLinker()) &&
isa<Function>(Func)) {
return getContext()
.getXCOFFSection(
NameStr, SectionKind::getText(),
- XCOFF::CsectProperties(XCOFF::XMC_PR, Func->isDeclaration()
+ XCOFF::CsectProperties(XCOFF::XMC_PR, Func->isDeclarationForLinker()
? XCOFF::XTY_ER
: XCOFF::XTY_SD))
->getQualNameSymbol();