Get rid of ReadOnlySection duplicate
[oota-llvm.git] / lib / Target / TargetAsmInfo.cpp
index df540393d5c56aeb3a0be1617b52a3737c373a3a..1c883ada90ca055559e5a66a29d659089eb8c842 100644 (file)
@@ -27,19 +27,15 @@ using namespace llvm;
 
 TargetAsmInfo::TargetAsmInfo() :
   TextSection(0),
-  DataSection("\t.data"),
-  DataSection_(0),
+  DataSection(0),
   BSSSection("\t.bss"),
   BSSSection_(0),
   ReadOnlySection(0),
-  ReadOnlySection_(0),
   SmallDataSection(0),
   SmallBSSSection(0),
   SmallRODataSection(0),
-  TLSDataSection("\t.section .tdata,\"awT\",@progbits"),
-  TLSDataSection_(0),
-  TLSBSSSection("\t.section .tbss,\"awT\",@nobits"),
-  TLSBSSSection_(0),
+  TLSDataSection(0),
+  TLSBSSSection(0),
   ZeroFillDirective(0),
   NonexecutableStackDirective(0),
   NeedsSet(false),
@@ -84,12 +80,6 @@ TargetAsmInfo::TargetAsmInfo() :
   CStringSection_(0),
   StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"),
   StaticDtorsSection("\t.section .dtors,\"aw\",@progbits"),
-  FourByteConstantSection(0),
-  FourByteConstantSection_(0),
-  EightByteConstantSection(0),
-  EightByteConstantSection_(0),
-  SixteenByteConstantSection(0),
-  SixteenByteConstantSection_(0),
   GlobalDirective("\t.globl\t"),
   SetDirective(0),
   LCOMMDirective(0),
@@ -126,7 +116,7 @@ TargetAsmInfo::TargetAsmInfo() :
   DwarfExceptionSection(".gcc_except_table"),
   AsmTransCBE(0) {
   TextSection = getUnnamedSection("\t.text", SectionFlags::Code);
-  DataSection_ = getUnnamedSection(DataSection);
+  DataSection = getUnnamedSection("\t.data", SectionFlags::Writeable);
 }
 
 TargetAsmInfo::~TargetAsmInfo() {
@@ -302,18 +292,18 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
       return getTextSection();
     else if (isBSS(Kind) && getBSSSection_())
       return getBSSSection_();
-    else if (getReadOnlySection_() && SectionKind::isReadOnly(Kind))
-      return getReadOnlySection_();
+    else if (getReadOnlySection() && SectionKind::isReadOnly(Kind))
+      return getReadOnlySection();
   }
 
-  return getDataSection_();
+  return getDataSection();
 }
 
 // Lame default implementation. Calculate the section name for machine const.
 const Section*
 TargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const {
   // FIXME: Support data.rel stuff someday
-  return getDataSection_();
+  return getDataSection();
 }
 
 std::string