make target-specific TLOF impls (except PIC16) create target-specific
authorChris Lattner <sabre@nondot.org>
Sat, 8 Aug 2009 20:52:13 +0000 (20:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 8 Aug 2009 20:52:13 +0000 (20:52 +0000)
MCSection instances.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78500 91177308-0d34-0410-b5e6-96231b3b80d8

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

index e73760a06646dbd2eb23306498fdd7ae9e5b6437..0669d0f39b1c5ec86a905d0c9c041f00dbafd69d 100644 (file)
@@ -72,12 +72,12 @@ namespace llvm {
                                   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);
   };
   
index 2d5eb33b4d735da5c018d99fa62c2690587897dd..ec6078ea37b4da0f30027f72a9d5d01aa21c7e2c 100644 (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) {
-  return new (Ctx) MCSectionPECOFF(Name, IsDirective, K, Ctx);
+  return new (Ctx) MCSectionCOFF(Name, IsDirective, K, Ctx);
 }
 
index eabd62637275b0e2126bb834b3a30561eebb7f47..bd3b37668dffdfabb0996eab29fba665b725b43d 100644 (file)
@@ -284,7 +284,7 @@ const MCSection *TargetLoweringObjectFileELF::
 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 @@ const MCSection *TargetLoweringObjectFileMachO::
 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 @@ const MCSection *TargetLoweringObjectFileCOFF::
 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,