[llvm-commits] [llvm] r78499 - in /llvm/trunk: include/llvm/MC/MCSection.h lib/MC/MCSection.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 8 13:50:50 PDT 2009
Author: lattner
Date: Sat Aug 8 15:50:49 2009
New Revision: 78499
URL: http://llvm.org/viewvc/llvm-project?rev=78499&view=rev
Log:
stub out PECOFF/MachO/ELF MCSection classes
Modified:
llvm/trunk/include/llvm/MC/MCSection.h
llvm/trunk/lib/MC/MCSection.cpp
Modified: llvm/trunk/include/llvm/MC/MCSection.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSection.h?rev=78499&r1=78498&r2=78499&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSection.h (original)
+++ llvm/trunk/include/llvm/MC/MCSection.h Sat Aug 8 15:50:49 2009
@@ -53,7 +53,33 @@
};
- typedef MCSection MCSectionELF;
+ class MCSectionELF : public MCSection {
+ MCSectionELF(const StringRef &Name, bool IsDirective, SectionKind K,
+ MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
+ public:
+
+ static MCSectionELF *Create(const StringRef &Name, bool IsDirective,
+ SectionKind K, MCContext &Ctx);
+
+ };
+
+ class MCSectionMachO : public MCSection {
+ MCSectionMachO(const StringRef &Name, bool IsDirective, SectionKind K,
+ MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
+ public:
+
+ static MCSectionMachO *Create(const StringRef &Name, bool IsDirective,
+ SectionKind K, MCContext &Ctx);
+ };
+
+ class MCSectionPECOFF : public MCSection {
+ MCSectionPECOFF(const StringRef &Name, bool IsDirective, SectionKind K,
+ MCContext &Ctx) : MCSection(Name, IsDirective, K, Ctx) {}
+ public:
+
+ static MCSectionPECOFF *Create(const StringRef &Name, bool IsDirective,
+ SectionKind K, MCContext &Ctx);
+ };
} // end namespace llvm
Modified: llvm/trunk/lib/MC/MCSection.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSection.cpp?rev=78499&r1=78498&r2=78499&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSection.cpp (original)
+++ llvm/trunk/lib/MC/MCSection.cpp Sat Aug 8 15:50:49 2009
@@ -22,8 +22,26 @@
Entry = this;
}
-MCSection *MCSection::Create(const StringRef &Name, bool IsDirective,
- SectionKind K, MCContext &Ctx) {
+MCSection *MCSection::
+Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
return new (Ctx) MCSection(Name, IsDirective, K, Ctx);
}
+
+MCSectionELF *MCSectionELF::
+Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
+ return new (Ctx) MCSectionELF(Name, IsDirective, K, Ctx);
+}
+
+
+MCSectionMachO *MCSectionMachO::
+Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
+ return new (Ctx) MCSectionMachO(Name, IsDirective, K, Ctx);
+}
+
+
+MCSectionPECOFF *MCSectionPECOFF::
+Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) {
+ return new (Ctx) MCSectionPECOFF(Name, IsDirective, K, Ctx);
+}
+
More information about the llvm-commits
mailing list