stub out PECOFF/MachO/ELF MCSection classes
authorChris Lattner <sabre@nondot.org>
Sat, 8 Aug 2009 20:50:49 +0000 (20:50 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 8 Aug 2009 20:50:49 +0000 (20:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78499 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCSection.h
lib/MC/MCSection.cpp

index bdc46be11d5d2527f8193c7ca4e63cd362a62c80..e73760a06646dbd2eb23306498fdd7ae9e5b6437 100644 (file)
@@ -53,7 +53,33 @@ namespace llvm {
   };
 
   
-  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
 
index 84487b24be2eda02a3346b1bdcb24de38f3be4c8..2d5eb33b4d735da5c018d99fa62c2690587897dd 100644 (file)
@@ -22,8 +22,26 @@ MCSection::MCSection(const StringRef &N, bool isDirective, SectionKind K,
   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);
+}
+