: AsmPrinter(o, tm), LabelNumber(0)
{
AlignmentIsInBytes = false;
+ PrivateGlobalPrefix = "$";
}
/// We name each basic block in a Function with a unique number, so
}
case MachineOperand::MO_ConstantPoolIndex:
- O << "$CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex();
+ O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_"
+ << MO.getConstantPoolIndex();
return;
case MachineOperand::MO_ExternalSymbol:
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
// SwitchSection(O, "section .rodata, \"dr\"");
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
- O << "$CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString
- << *CP[i] << "\n";
+ O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i
+ << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
emitGlobalConstant(CP[i]);
}
}
// FIXME: would be nice to have rodata (no 'w') when appropriate?
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
- O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString
- << *CP[i] << "\n";
+ O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i
+ << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
emitGlobalConstant(CP[i]);
}
}
return;
case MachineOperand::MO_ConstantPoolIndex: {
- O << "@gprel(.CPI" << CurrentFnName << "_"
+ O << "@gprel(" << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_"
<< MO.getConstantPoolIndex() << ")";
return;
}