summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-08-07 21:13:06 +0000
committerEric Christopher <echristo@gmail.com>2013-08-07 21:13:06 +0000
commit7af8baf678f7e9590f80d82327676aa3b43ba7a7 (patch)
tree37b2a271c20e7756d725844ec83d9ad79921fca3 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent42ae4591746ae99bb5b3b90cffa6430971b6b02b (diff)
downloadbcm5719-llvm-7af8baf678f7e9590f80d82327676aa3b43ba7a7.tar.gz
bcm5719-llvm-7af8baf678f7e9590f80d82327676aa3b43ba7a7.zip
Using the integrated assembler we'd fail to change section to the
.tbss section for zerofill thread locals. Make sure we do this before emitting the zerofills. Fixes PR15972. llvm-svn: 187913
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 0c59286fa95..12c35747ee4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -368,9 +368,10 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
MCSymbol *MangSym =
OutContext.GetOrCreateSymbol(GVSym->getName() + Twine("$tlv$init"));
- if (GVKind.isThreadBSS())
+ if (GVKind.isThreadBSS()) {
+ TheSection = getObjFileLowering().getTLSBSSSection();
OutStreamer.EmitTBSSSymbol(TheSection, MangSym, Size, 1 << AlignLog);
- else if (GVKind.isThreadData()) {
+ } else if (GVKind.isThreadData()) {
OutStreamer.SwitchSection(TheSection);
EmitAlignment(AlignLog, GV);
OpenPOWER on IntegriCloud