1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

make target-specific TLOF impls (except PIC16) create target-specific

MCSection instances.

llvm-svn: 78500
This commit is contained in:
Chris Lattner 2009-08-08 20:52:13 +00:00
parent 95ca008a43
commit 53cc0d6439
3 changed files with 9 additions and 9 deletions

View File

@ -72,12 +72,12 @@ namespace llvm {
SectionKind K, MCContext &Ctx); SectionKind K, MCContext &Ctx);
}; };
class MCSectionPECOFF : public MCSection { class MCSectionCOFF : public MCSection {
MCSectionPECOFF(const StringRef &Name, bool IsDirective, SectionKind K, MCSectionCOFF(const StringRef &Name, bool IsDirective, SectionKind K,
MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {} MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
public: public:
static MCSectionPECOFF *Create(const StringRef &Name, bool IsDirective, static MCSectionCOFF *Create(const StringRef &Name, bool IsDirective,
SectionKind K, MCContext &Ctx); SectionKind K, MCContext &Ctx);
}; };

View File

@ -40,8 +40,8 @@ Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
} }
MCSectionPECOFF *MCSectionPECOFF:: MCSectionCOFF *MCSectionCOFF::
Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) { Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
return new (Ctx) MCSectionPECOFF(Name, IsDirective, K, Ctx); return new (Ctx) MCSectionCOFF(Name, IsDirective, K, Ctx);
} }

View File

@ -284,7 +284,7 @@ const MCSection *TargetLoweringObjectFileELF::
getELFSection(const char *Name, bool isDirective, SectionKind Kind) const { getELFSection(const char *Name, bool isDirective, SectionKind Kind) const {
if (MCSection *S = getContext().GetSection(Name)) if (MCSection *S = getContext().GetSection(Name))
return S; return S;
return MCSection::Create(Name, isDirective, Kind, getContext()); return MCSectionELF::Create(Name, isDirective, Kind, getContext());
} }
void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx, void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx,
@ -598,7 +598,7 @@ const MCSection *TargetLoweringObjectFileMachO::
getMachOSection(const char *Name, bool isDirective, SectionKind Kind) const { getMachOSection(const char *Name, bool isDirective, SectionKind Kind) const {
if (MCSection *S = getContext().GetSection(Name)) if (MCSection *S = getContext().GetSection(Name))
return S; return S;
return MCSection::Create(Name, isDirective, Kind, getContext()); return MCSectionMachO::Create(Name, isDirective, Kind, getContext());
} }
@ -808,7 +808,7 @@ const MCSection *TargetLoweringObjectFileCOFF::
getCOFFSection(const char *Name, bool isDirective, SectionKind Kind) const { getCOFFSection(const char *Name, bool isDirective, SectionKind Kind) const {
if (MCSection *S = getContext().GetSection(Name)) if (MCSection *S = getContext().GetSection(Name))
return S; return S;
return MCSection::Create(Name, isDirective, Kind, getContext()); return MCSectionCOFF::Create(Name, isDirective, Kind, getContext());
} }
void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx, void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx,