[llvm] f731839 - [LowerEmuTls] Copy dso_local from <var> to __emutls_v.<var>

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 30 16:11:40 PST 2020


Author: Fangrui Song
Date: 2020-12-30T16:11:32-08:00
New Revision: f73183958482602c4588b0f4a1c3a096e7542947

URL: https://github.com/llvm/llvm-project/commit/f73183958482602c4588b0f4a1c3a096e7542947
DIFF: https://github.com/llvm/llvm-project/commit/f73183958482602c4588b0f4a1c3a096e7542947.diff

LOG: [LowerEmuTls] Copy dso_local from <var> to __emutls_v.<var>

This effect is not testable until we drop the implied dso_local for ELF
static/PIE defined symbols from TargetMachine::shouldAssumeDSOLocal.

Added: 
    

Modified: 
    llvm/lib/CodeGen/LowerEmuTLS.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/LowerEmuTLS.cpp b/llvm/lib/CodeGen/LowerEmuTLS.cpp
index 0afdee45cda7..a06d1d6255c7 100644
--- a/llvm/lib/CodeGen/LowerEmuTLS.cpp
+++ b/llvm/lib/CodeGen/LowerEmuTLS.cpp
@@ -44,6 +44,7 @@ class LowerEmuTLS : public ModulePass {
                                     GlobalVariable *to) {
     to->setLinkage(from->getLinkage());
     to->setVisibility(from->getVisibility());
+    to->setDSOLocal(from->isDSOLocal());
     if (from->hasComdat()) {
       to->setComdat(M.getOrInsertComdat(to->getName()));
       to->getComdat()->setSelectionKind(from->getComdat()->getSelectionKind());


        


More information about the llvm-commits mailing list