summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-04-23 21:29:34 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-04-23 21:29:34 +0000
commit49babc916aa0186ba8347d0216069a84cb67da31 (patch)
tree7e2ada28b32af3c8223f662ec4360e792d08136a /lib
parent08e5ef25fb0be95aef82d3dd2d4b81aa1cd08aed (diff)
downloadllvm-49babc916aa0186ba8347d0216069a84cb67da31.tar.gz
llvm-49babc916aa0186ba8347d0216069a84cb67da31.tar.bz2
llvm-49babc916aa0186ba8347d0216069a84cb67da31.tar.xz
MC: honour IMAGE_SCN_CNT_INITIALIZED_DATA
Emit the flag to indicate to the assembler that a section contains data if there is pre-populated data present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCSectionCOFF.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/MC/MCSectionCOFF.cpp b/lib/MC/MCSectionCOFF.cpp
index 05f0b721b8..335b8cd612 100644
--- a/lib/MC/MCSectionCOFF.cpp
+++ b/lib/MC/MCSectionCOFF.cpp
@@ -62,7 +62,8 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << 'r';
if (getCharacteristics() & COFF::IMAGE_SCN_MEM_DISCARDABLE)
OS << 'n';
-
+ if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA)
+ OS << 'd';
OS << '"';
if (getCharacteristics() & COFF::IMAGE_SCN_LNK_COMDAT) {