printConstantPool(MF.getConstantPool());
// Print out labels for the function.
- O << "\t.text\n";
+ SwitchSection("\t.text\n", MF.getFunction());
emitAlignment(4); // FIXME: This should be parameterized somewhere.
O << "\t.globl\t" << CurrentFnName << "\n";
if (!forCygwin && !forDarwin)
if (CP.empty()) return;
- if (forDarwin) {
- O << "\t.const\n";
- } else {
- O << "\t.section .rodata\n";
- }
+ SwitchSection(forDarwin ? "\t.const\n" : "\t.section .rodata\n", 0);
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
// FIXME: force doubles to be naturally aligned. We should handle this
}
if (forDarwin) {
+ SwitchSection("", 0);
// Output stubs for external global variables
if (GVStubs.begin() != GVStubs.end())
O << "\t.non_lazy_symbol_pointer\n";
printConstantPool(MF.getConstantPool());
// Print out labels for the function.
- O << "\t.text\n";
+ SwitchSection("\t.text\n", MF.getFunction());
emitAlignment(4);
O << "\t.globl\t" << CurrentFnName << "\n";
if (!forCygwin && !forDarwin)