Add support for initialized global data for darwin tls. Update comments
and testcases accordingly.
llvm-svn: 104635
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 605e2a8..71ad3fb 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -670,11 +670,10 @@
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const {
- // Handle one kind of thread local...
+ // Handle thread local data.
if (Kind.isThreadBSS()) return TLSBSSSection;
+ if (Kind.isThreadData()) return TLSDataSection;
- assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS");
-
if (Kind.isText())
return GV->isWeakForLinker() ? TextCoalSection : TextSection;