llvm.org GIT mirror llvm / 36133dd
Get rid of duplicate char*/Section* stuff for TLS sections git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56577 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 11 years ago
4 changed file(s) with 11 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
165165
166166 /// TLSDataSection - Section directive for Thread Local data.
167167 ///
168 const char *TLSDataSection;// Defaults to ".section .tdata,"awT",@progbits".
169 const Section *TLSDataSection_;
168 const Section *TLSDataSection; // Defaults to ".tdata".
170169
171170 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
172171 /// Null if this target doesn't support a BSS section.
173172 ///
174 const char *TLSBSSSection;// Default to ".section .tbss,"awT",@nobits".
175 const Section *TLSBSSSection_;
173 const Section *TLSBSSSection; // Defaults to ".tbss".
176174
177175 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
178176 /// section on this target. Null if this target doesn't support zerofill.
623621 const Section *getSmallRODataSection() const {
624622 return SmallRODataSection;
625623 }
626 const char *getTLSDataSection() const {
624 const Section *getTLSDataSection() const {
627625 return TLSDataSection;
628626 }
629 const Section *getTLSDataSection_() const {
630 return TLSDataSection_;
631 }
632 const char *getTLSBSSSection() const {
627 const Section *getTLSBSSSection() const {
633628 return TLSBSSSection;
634 }
635 const Section *getTLSBSSSection_() const {
636 return TLSBSSSection_;
637629 }
638630 const char *getZeroFillDirective() const {
639631 return ZeroFillDirective;
140140 StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits";
141141 StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits";
142142 }
143 TLSDataSection = "\t.section .tdata,\"awT\",%progbits";
144 TLSBSSSection = "\t.section .tbss,\"awT\",%nobits";
145143 }
146144
147145 /// Count the number of comma-separated arguments.
2929 BSSSection_ = getUnnamedSection("\t.bss",
3030 SectionFlags::Writeable | SectionFlags::BSS);
3131 ReadOnlySection_ = getNamedSection("\t.rodata", SectionFlags::None);
32 TLSDataSection_ = getNamedSection("\t.tdata",
33 SectionFlags::Writeable | SectionFlags::TLS);
34 TLSBSSSection_ = getNamedSection("\t.tbss",
32 TLSDataSection = getNamedSection("\t.tdata",
33 SectionFlags::Writeable | SectionFlags::TLS);
34 TLSBSSSection = getNamedSection("\t.tbss",
3535 SectionFlags::Writeable | SectionFlags::TLS | SectionFlags::BSS);
3636
3737 }
7676 return MergeableConstSection(GVar);
7777 case SectionKind::ThreadData:
7878 // ELF targets usually support TLS stuff
79 return getTLSDataSection_();
79 return TLSDataSection;
8080 case SectionKind::ThreadBSS:
81 return getTLSBSSSection_();
81 return TLSBSSSection;
8282 default:
8383 assert(0 && "Unsuported section kind for global");
8484 }
3434 SmallDataSection(0),
3535 SmallBSSSection(0),
3636 SmallRODataSection(0),
37 TLSDataSection("\t.section .tdata,\"awT\",@progbits"),
38 TLSDataSection_(0),
39 TLSBSSSection("\t.section .tbss,\"awT\",@nobits"),
40 TLSBSSSection_(0),
37 TLSDataSection(0),
38 TLSBSSSection(0),
4139 ZeroFillDirective(0),
4240 NonexecutableStackDirective(0),
4341 NeedsSet(false),