[llvm-commits] [llvm] r78500 - in /llvm/trunk: include/llvm/MC/MCSection.h lib/MC/MCSection.cpp lib/Target/TargetLoweringObjectFile.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 8 13:52:13 PDT 2009
Author: lattner
Date: Sat Aug 8 15:52:13 2009
New Revision: 78500
URL: http://llvm.org/viewvc/llvm-project?rev=78500&view=rev
Log:
make target-specific TLOF impls (except PIC16) create target-specific
MCSection instances.
Modified:
llvm/trunk/include/llvm/MC/MCSection.h
llvm/trunk/lib/MC/MCSection.cpp
llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
Modified: llvm/trunk/include/llvm/MC/MCSection.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSection.h?rev=78500&r1=78499&r2=78500&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSection.h (original)
+++ llvm/trunk/include/llvm/MC/MCSection.h Sat Aug 8 15:52:13 2009
@@ -72,12 +72,12 @@
SectionKind K, MCContext &Ctx);
};
- class MCSectionPECOFF : public MCSection {
- MCSectionPECOFF(const StringRef &Name, bool IsDirective, SectionKind K,
- MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
+ class MCSectionCOFF : public MCSection {
+ MCSectionCOFF(const StringRef &Name, bool IsDirective, SectionKind K,
+ MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
public:
- static MCSectionPECOFF *Create(const StringRef &Name, bool IsDirective,
+ static MCSectionCOFF *Create(const StringRef &Name, bool IsDirective,
SectionKind K, MCContext &Ctx);
};
Modified: llvm/trunk/lib/MC/MCSection.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSection.cpp?rev=78500&r1=78499&r2=78500&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSection.cpp (original)
+++ llvm/trunk/lib/MC/MCSection.cpp Sat Aug 8 15:52:13 2009
@@ -40,8 +40,8 @@
}
-MCSectionPECOFF *MCSectionPECOFF::
+MCSectionCOFF *MCSectionCOFF::
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);
}
Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=78500&r1=78499&r2=78500&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Sat Aug 8 15:52:13 2009
@@ -284,7 +284,7 @@
getELFSection(const char *Name, bool isDirective, SectionKind Kind) const {
if (MCSection *S = getContext().GetSection(Name))
return S;
- return MCSection::Create(Name, isDirective, Kind, getContext());
+ return MCSectionELF::Create(Name, isDirective, Kind, getContext());
}
void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx,
@@ -598,7 +598,7 @@
getMachOSection(const char *Name, bool isDirective, SectionKind Kind) const {
if (MCSection *S = getContext().GetSection(Name))
return S;
- return MCSection::Create(Name, isDirective, Kind, getContext());
+ return MCSectionMachO::Create(Name, isDirective, Kind, getContext());
}
@@ -808,7 +808,7 @@
getCOFFSection(const char *Name, bool isDirective, SectionKind Kind) const {
if (MCSection *S = getContext().GetSection(Name))
return S;
- return MCSection::Create(Name, isDirective, Kind, getContext());
+ return MCSectionCOFF::Create(Name, isDirective, Kind, getContext());
}
void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx,
More information about the llvm-commits
mailing list