[llvm-commits] [llvm] r56577 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/ARM/ARMTargetAsmInfo.cpp lib/Target/ELFTargetAsmInfo.cpp lib/Target/TargetAsmInfo.cpp

Anton Korobeynikov asl at math.spbu.ru
Wed Sep 24 15:17:06 PDT 2008


Author: asl
Date: Wed Sep 24 17:17:06 2008
New Revision: 56577

URL: http://llvm.org/viewvc/llvm-project?rev=56577&view=rev
Log:
Get rid of duplicate char*/Section* stuff for TLS sections

Modified:
    llvm/trunk/include/llvm/Target/TargetAsmInfo.h
    llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
    llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
    llvm/trunk/lib/Target/TargetAsmInfo.cpp

Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=56577&r1=56576&r2=56577&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Wed Sep 24 17:17:06 2008
@@ -166,14 +166,12 @@
 
     /// TLSDataSection - Section directive for Thread Local data.
     ///
-    const char *TLSDataSection;// Defaults to ".section .tdata,"awT", at progbits".
-    const Section *TLSDataSection_;
+    const Section *TLSDataSection;        // Defaults to ".tdata".
 
     /// TLSBSSSection - Section directive for Thread Local uninitialized data.
     /// Null if this target doesn't support a BSS section.
     ///
-    const char *TLSBSSSection;// Default to ".section .tbss,"awT", at nobits".
-    const Section *TLSBSSSection_;
+    const Section *TLSBSSSection;         // Defaults to ".tbss".
 
     /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
     /// section on this target.  Null if this target doesn't support zerofill.
@@ -624,18 +622,12 @@
     const Section *getSmallRODataSection() const {
       return SmallRODataSection;
     }
-    const char *getTLSDataSection() const {
+    const Section *getTLSDataSection() const {
       return TLSDataSection;
     }
-    const Section *getTLSDataSection_() const {
-      return TLSDataSection_;
-    }
-    const char *getTLSBSSSection() const {
+    const Section *getTLSBSSSection() const {
       return TLSBSSSection;
     }
-    const Section *getTLSBSSSection_() const {
-      return TLSBSSSection_;
-    }
     const char *getZeroFillDirective() const {
       return ZeroFillDirective;
     }

Modified: llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp?rev=56577&r1=56576&r2=56577&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp Wed Sep 24 17:17:06 2008
@@ -141,8 +141,6 @@
     StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits";
     StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits";
   }
-  TLSDataSection = "\t.section .tdata,\"awT\",%progbits";
-  TLSBSSSection = "\t.section .tbss,\"awT\",%nobits";
 }
 
 /// Count the number of comma-separated arguments.

Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=56577&r1=56576&r2=56577&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Wed Sep 24 17:17:06 2008
@@ -30,9 +30,9 @@
   BSSSection_  = getUnnamedSection("\t.bss",
                                    SectionFlags::Writeable | SectionFlags::BSS);
   ReadOnlySection_ = getNamedSection("\t.rodata", SectionFlags::None);
-  TLSDataSection_ = getNamedSection("\t.tdata",
-                                    SectionFlags::Writeable | SectionFlags::TLS);
-  TLSBSSSection_ = getNamedSection("\t.tbss",
+  TLSDataSection = getNamedSection("\t.tdata",
+                                   SectionFlags::Writeable | SectionFlags::TLS);
+  TLSBSSSection = getNamedSection("\t.tbss",
                 SectionFlags::Writeable | SectionFlags::TLS | SectionFlags::BSS);
 
 }
@@ -77,9 +77,9 @@
         return MergeableConstSection(GVar);
        case SectionKind::ThreadData:
         // ELF targets usually support TLS stuff
-        return getTLSDataSection_();
+        return TLSDataSection;
        case SectionKind::ThreadBSS:
-        return getTLSBSSSection_();
+        return TLSBSSSection;
        default:
         assert(0 && "Unsuported section kind for global");
       }

Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=56577&r1=56576&r2=56577&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Wed Sep 24 17:17:06 2008
@@ -35,10 +35,8 @@
   SmallDataSection(0),
   SmallBSSSection(0),
   SmallRODataSection(0),
-  TLSDataSection("\t.section .tdata,\"awT\", at progbits"),
-  TLSDataSection_(0),
-  TLSBSSSection("\t.section .tbss,\"awT\", at nobits"),
-  TLSBSSSection_(0),
+  TLSDataSection(0),
+  TLSBSSSection(0),
   ZeroFillDirective(0),
   NonexecutableStackDirective(0),
   NeedsSet(false),





More information about the llvm-commits mailing list