summaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSectionCOFF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCSectionCOFF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionCOFF.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCSectionCOFF.cpp b/llvm/lib/MC/MCSectionCOFF.cpp
index f0c06f70bd734..387bf2c884e58 100644
--- a/llvm/lib/MC/MCSectionCOFF.cpp
+++ b/llvm/lib/MC/MCSectionCOFF.cpp
@@ -38,12 +38,12 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
raw_ostream &OS,
const MCExpr *Subsection) const {
// standard sections don't require the '.section'
- if (ShouldOmitSectionDirective(SectionName, MAI)) {
- OS << '\t' << getSectionName() << '\n';
+ if (ShouldOmitSectionDirective(getName(), MAI)) {
+ OS << '\t' << getName() << '\n';
return;
}
- OS << "\t.section\t" << getSectionName() << ",\"";
+ OS << "\t.section\t" << getName() << ",\"";
if (getCharacteristics() & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA)
OS << 'd';
if (getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA)
@@ -61,7 +61,7 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
if (getCharacteristics() & COFF::IMAGE_SCN_MEM_SHARED)
OS << 's';
if ((getCharacteristics() & COFF::IMAGE_SCN_MEM_DISCARDABLE) &&
- !isImplicitlyDiscardable(SectionName))
+ !isImplicitlyDiscardable(getName()))
OS << 'D';
OS << '"';
@@ -111,3 +111,7 @@ bool MCSectionCOFF::UseCodeAlign() const {
bool MCSectionCOFF::isVirtualSection() const {
return getCharacteristics() & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
}
+
+StringRef MCSectionCOFF::getVirtualSectionKind() const {
+ return "IMAGE_SCN_CNT_UNINITIALIZED_DATA";
+}