diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-07 23:04:06 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-07 23:04:06 +0000 |
commit | 75e5736926bc03de96651e19ce0387924125cd18 (patch) | |
tree | 738fd81c45fe5e65877cb71f413025aad887d7fd /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 37765ff326cecbaa9aca87c40312749a6ef3c768 (diff) | |
download | bcm5719-llvm-75e5736926bc03de96651e19ce0387924125cd18.tar.gz bcm5719-llvm-75e5736926bc03de96651e19ce0387924125cd18.zip |
Don't try to use copy relocations with tls variables.
Should fix the lldb bot.
llvm-svn: 324539
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 7fa4fddc79e..9e42aa2750f 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -746,9 +746,10 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, return false; // If we can use copy relocations we can assume it is local. - if (isa<VarDecl>(D) && - (RM == llvm::Reloc::Static || CGOpts.PIECopyRelocations)) - return true; + if (auto *VD = dyn_cast<VarDecl>(D)) + if (VD->getTLSKind() == VarDecl::TLS_None && + (RM == llvm::Reloc::Static || CGOpts.PIECopyRelocations)) + return true; // If we can use a plt entry as the symbol address we can assume it // is local. |