diff options
| author | Manman Ren <manman.ren@gmail.com> | 2015-11-11 23:08:18 +0000 |
|---|---|---|
| committer | Manman Ren <manman.ren@gmail.com> | 2015-11-11 23:08:18 +0000 |
| commit | f93fff27f0d4f848e79fd695d126a0abf264d9c4 (patch) | |
| tree | 5b256437d7d1ab46c5c05c23e275455b4844e491 | |
| parent | 2b90a64e319be87760ca2b4323362b1b0e403182 (diff) | |
| download | bcm5719-llvm-f93fff27f0d4f848e79fd695d126a0abf264d9c4.tar.gz bcm5719-llvm-f93fff27f0d4f848e79fd695d126a0abf264d9c4.zip | |
[TLS on Darwin] treat all Darwin platforms in the same way.
rdar://problem/9001553
llvm-svn: 252820
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 5f4de74014f..b587783c36a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2323,7 +2323,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { // variable. This is to preserve the ability to change the implementation // behind the scenes. if (!D->isStaticLocal() && D->getTLSKind() == VarDecl::TLS_Dynamic && - Context.getTargetInfo().getTriple().isMacOSX() && + Context.getTargetInfo().getTriple().isOSDarwin() && !llvm::GlobalVariable::isLinkOnceLinkage(Linkage) && !llvm::GlobalVariable::isWeakLinkage(Linkage)) Linkage = llvm::GlobalValue::InternalLinkage; diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index a6402f233c3..3b501c30e77 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -2088,7 +2088,7 @@ static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &CGF, const char *Name = "__cxa_atexit"; if (TLS) { const llvm::Triple &T = CGF.getTarget().getTriple(); - Name = T.isMacOSX() ? "_tlv_atexit" : "__cxa_thread_atexit"; + Name = T.isOSDarwin() ? "_tlv_atexit" : "__cxa_thread_atexit"; } // We're assuming that the destructor function is something we can @@ -2144,10 +2144,10 @@ void ItaniumCXXABI::registerGlobalDtor(CodeGenFunction &CGF, static bool isThreadWrapperReplaceable(const VarDecl *VD, CodeGen::CodeGenModule &CGM) { assert(!VD->isStaticLocal() && "static local VarDecls don't need wrappers!"); - // OS X prefers to have references to thread local variables to go through + // Darwin prefers to have references to thread local variables to go through // the thread wrapper instead of directly referencing the backing variable. return VD->getTLSKind() == VarDecl::TLS_Dynamic && - CGM.getTarget().getTriple().isMacOSX(); + CGM.getTarget().getTriple().isOSDarwin(); } /// Get the appropriate linkage for the wrapper function. This is essentially |

