summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSectionXCOFF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCSectionXCOFF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionXCOFF.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSectionXCOFF.cpp b/llvm/lib/MC/MCSectionXCOFF.cpp
index d00a435b625..db277521db2 100644
--- a/llvm/lib/MC/MCSectionXCOFF.cpp
+++ b/llvm/lib/MC/MCSectionXCOFF.cpp
@@ -28,6 +28,16 @@ void MCSectionXCOFF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
return;
}
+ if (getKind().isData()) {
+ assert(getMappingClass() == XCOFF::XMC_RW &&
+ "Unhandled storage-mapping class for data section.");
+
+ OS << "\t.csect " << getSectionName() << "["
+ << "RW"
+ << "]" << '\n';
+ return;
+ }
+
if (getKind().isBSSLocal() || getKind().isCommon()) {
assert((getMappingClass() == XCOFF::XMC_RW ||
getMappingClass() == XCOFF::XMC_BS) &&
OpenPOWER on IntegriCloud