/// this.
const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
- /// TextSectionStartSuffix - This is printed after each start of section
- /// directive for text sections.
- const char *TextSectionStartSuffix; // Defaults to "".
-
- /// DataSectionStartSuffix - This is printed after each start of section
- /// directive for data sections.
- const char *DataSectionStartSuffix; // Defaults to "".
-
/// JumpTableDirective - if non-null, the directive to emit before a jump
/// table.
const char *JumpTableDirective;
const char *getSwitchToSectionDirective() const {
return SwitchToSectionDirective;
}
- const char *getTextSectionStartSuffix() const {
- return TextSectionStartSuffix;
- }
- const char *getDataSectionStartSuffix() const {
- return DataSectionStartSuffix;
- }
const char *getGlobalDirective() const {
return GlobalDirective;
}
CurrentSection = NS;
- if (NS != 0) {
- // If section is named we need to switch into it via special '.section'
- // directive and also append funky flags. Otherwise - section name is just
- // some magic assembler directive.
- if (!NS->isDirective()) {
- SmallString<32> FlagsStr;
-
- getObjFileLowering().getSectionFlagsAsString(NS->getKind(), FlagsStr);
-
- O << TAI->getSwitchToSectionDirective()
- << CurrentSection->getName() << FlagsStr.c_str();
- } else {
- O << CurrentSection->getName();
- }
- O << TAI->getDataSectionStartSuffix() << '\n';
+ if (NS == 0) return;
+
+ // If section is named we need to switch into it via special '.section'
+ // directive and also append funky flags. Otherwise - section name is just
+ // some magic assembler directive.
+ if (!NS->isDirective()) {
+ SmallString<32> FlagsStr;
+ getObjFileLowering().getSectionFlagsAsString(NS->getKind(), FlagsStr);
+
+ O << TAI->getSwitchToSectionDirective()
+ << CurrentSection->getName() << FlagsStr.c_str() << '\n';
+ } else {
+ O << CurrentSection->getName() << '\n';
}
}
AlignmentIsInBytes = true;
TextAlignFillValue = 0;
SwitchToSectionDirective = "\t.section\t";
- TextSectionStartSuffix = "";
- DataSectionStartSuffix = "";
JumpTableDirective = 0;
GlobalDirective = "\t.globl\t";
SetDirective = 0;
HasSingleParameterDotFile = false;
AlignmentIsInBytes = true;
-
- SwitchToSectionDirective = "";
- TextSectionStartSuffix = "\tSEGMENT PARA 'CODE'";
- DataSectionStartSuffix = "\tSEGMENT PARA 'DATA'";
}
// Instantiate default implementation.