mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
sink getOrCreateSection down into all the object file implementations,
now that they create *all* the sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78494 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -274,19 +274,18 @@ TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const {
|
||||
}
|
||||
|
||||
|
||||
const MCSection *TargetLoweringObjectFile::
|
||||
getOrCreateSection(const char *Name, bool isDirective, SectionKind Kind) const {
|
||||
if (MCSection *S = Ctx->GetSection(Name))
|
||||
return S;
|
||||
return MCSection::Create(Name, isDirective, Kind, *Ctx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ELF
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
const MCSection *TargetLoweringObjectFileELF::
|
||||
getOrCreateSection(const char *Name, bool isDirective, SectionKind Kind) const {
|
||||
if (MCSection *S = getContext().GetSection(Name))
|
||||
return S;
|
||||
return MCSection::Create(Name, isDirective, Kind, getContext());
|
||||
}
|
||||
|
||||
void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx,
|
||||
const TargetMachine &TM) {
|
||||
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
||||
@ -575,6 +574,13 @@ getSectionForConstant(SectionKind Kind) const {
|
||||
// MachO
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
const MCSection *TargetLoweringObjectFileMachO::
|
||||
getOrCreateSection(const char *Name, bool isDirective, SectionKind Kind) const {
|
||||
if (MCSection *S = getContext().GetSection(Name))
|
||||
return S;
|
||||
return MCSection::Create(Name, isDirective, Kind, getContext());
|
||||
}
|
||||
|
||||
const MCSection *TargetLoweringObjectFileMachO::
|
||||
getMachOSection(const char *Name, bool isDirective, SectionKind K) {
|
||||
// FOR NOW, Just forward.
|
||||
@ -788,6 +794,13 @@ shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const {
|
||||
// COFF
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
const MCSection *TargetLoweringObjectFileCOFF::
|
||||
getOrCreateSection(const char *Name, bool isDirective, SectionKind Kind) const {
|
||||
if (MCSection *S = getContext().GetSection(Name))
|
||||
return S;
|
||||
return MCSection::Create(Name, isDirective, Kind, getContext());
|
||||
}
|
||||
|
||||
const MCSection *TargetLoweringObjectFileCOFF::
|
||||
getCOFFSection(const char *Name, bool isDirective, SectionKind K) {
|
||||
return getOrCreateSection(Name, isDirective, K);
|
||||
|
Reference in New Issue
Block a user