summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/MC/MCSectionCOFF.cpp2
-rw-r--r--llvm/test/MC/COFF/bss_section.ll3
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSectionCOFF.cpp b/llvm/lib/MC/MCSectionCOFF.cpp
index bb350274640..ad9ca8840f4 100644
--- a/llvm/lib/MC/MCSectionCOFF.cpp
+++ b/llvm/lib/MC/MCSectionCOFF.cpp
@@ -54,6 +54,8 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << "\t.section\t" << getSectionName() << ",\"";
if (getKind().isText())
OS << 'x';
+ else if (getKind().isBSS())
+ OS << 'b';
if (getKind().isWriteable())
OS << 'w';
else
diff --git a/llvm/test/MC/COFF/bss_section.ll b/llvm/test/MC/COFF/bss_section.ll
index 60924f13064..477b3dfbd3a 100644
--- a/llvm/test/MC/COFF/bss_section.ll
+++ b/llvm/test/MC/COFF/bss_section.ll
@@ -4,3 +4,6 @@
@"\01?thingy@@3Ufoo@@B" = global %struct.foo zeroinitializer, align 4
; CHECK: .bss
+
+@thingy_linkonce = linkonce_odr global %struct.foo zeroinitializer, align 4
+; CHECK: .section .bss,"bw",discard,_thingy_linkonce
OpenPOWER on IntegriCloud