Don't try to use copy relocations with tls variables.

Should fix the lldb bot.

llvm-svn: 324539
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 7fa4fdd..9e42aa2 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -746,9 +746,10 @@
     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.