summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-07-18 00:21:40 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-07-18 00:21:40 +0000
commitfc50498ced7f85279b901fce302d01e558c74c7d (patch)
tree5a07244400533ce0f04cd9234a051932999b012b /llvm/lib/CodeGen
parent0f5d5fae93404357c84d7d1b96fddb022c093d49 (diff)
downloadbcm5719-llvm-fc50498ced7f85279b901fce302d01e558c74c7d.tar.gz
bcm5719-llvm-fc50498ced7f85279b901fce302d01e558c74c7d.zip
CodeGen: Don't create address significance table entries for thread-local variables.
The presence of these symbols in the symbol table can cause symbol type mismatch errors (or undefined symbol errors on emulated TLS targets) and they can't be ICF'd anyway. llvm-svn: 337338
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 30c95a7138d..1b429331a35 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1533,7 +1533,8 @@ bool AsmPrinter::doFinalization(Module &M) {
// Emit address-significance attributes for all globals.
OutStreamer->EmitAddrsig();
for (const GlobalValue &GV : M.global_values())
- if (!GV.getName().startswith("llvm.") && !GV.hasAtLeastLocalUnnamedAddr())
+ if (!GV.isThreadLocal() && !GV.getName().startswith("llvm.") &&
+ !GV.hasAtLeastLocalUnnamedAddr())
OutStreamer->EmitAddrsigSym(getSymbol(&GV));
}
OpenPOWER on IntegriCloud