forked from OSchip/llvm-project
Revert "Micro-optimization"
This reverts commit f1d9fe9d04ce93f6d5dcebbd2cb6a07414d7a029. This was causing PR17964. We need to use thread data before regular data. llvm-svn: 194960
This commit is contained in:
parent
bb1dd73d3e
commit
25b61dbac0
|
@ -523,6 +523,11 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
|
|||
const MCSection *TargetLoweringObjectFileMachO::
|
||||
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
Mangler *Mang, const TargetMachine &TM) const {
|
||||
|
||||
// Handle thread local data.
|
||||
if (Kind.isThreadBSS()) return TLSBSSSection;
|
||||
if (Kind.isThreadData()) return TLSDataSection;
|
||||
|
||||
if (Kind.isText())
|
||||
return GV->isWeakForLinker() ? TextCoalSection : TextSection;
|
||||
|
||||
|
@ -575,10 +580,6 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
|||
if (Kind.isBSSLocal())
|
||||
return DataBSSSection;
|
||||
|
||||
// Handle thread local data.
|
||||
if (Kind.isThreadBSS()) return TLSBSSSection;
|
||||
if (Kind.isThreadData()) return TLSDataSection;
|
||||
|
||||
// Otherwise, just drop the variable in the normal data section.
|
||||
return DataSection;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue