summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-21 06:51:52 +0000
committerChris Lattner <sabre@nondot.org>2005-11-21 06:51:52 +0000
commit8a4995e42a0fb98dfc971f1f24f1bfd88cb59e70 (patch)
treef3067f986573bd141064e19e7ac29f7317283cdf /llvm/lib/Target
parent41cb115afbdeee87945a0f2967943104b46cfed9 (diff)
downloadbcm5719-llvm-8a4995e42a0fb98dfc971f1f24f1bfd88cb59e70.tar.gz
bcm5719-llvm-8a4995e42a0fb98dfc971f1f24f1bfd88cb59e70.zip
Start using PrivateGlobalPrefix correctly
llvm-svn: 24442
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp8
-rw-r--r--llvm/lib/Target/IA64/IA64AsmPrinter.cpp6
2 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
index 9581c0c532e..e902b2d597f 100644
--- a/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -43,6 +43,7 @@ namespace {
: AsmPrinter(o, tm), LabelNumber(0)
{
AlignmentIsInBytes = false;
+ PrivateGlobalPrefix = "$";
}
/// We name each basic block in a Function with a unique number, so
@@ -131,7 +132,8 @@ void AlphaAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) {
}
case MachineOperand::MO_ConstantPoolIndex:
- O << "$CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex();
+ O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_"
+ << MO.getConstantPoolIndex();
return;
case MachineOperand::MO_ExternalSymbol:
@@ -222,8 +224,8 @@ void AlphaAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
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]);
}
}
diff --git a/llvm/lib/Target/IA64/IA64AsmPrinter.cpp b/llvm/lib/Target/IA64/IA64AsmPrinter.cpp
index d96a10a08ff..b024a0f21c3 100644
--- a/llvm/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/llvm/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -88,8 +88,8 @@ void IA64SharedAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
// 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]);
}
}
@@ -357,7 +357,7 @@ void IA64AsmPrinter::printOp(const MachineOperand &MO,
return;
case MachineOperand::MO_ConstantPoolIndex: {
- O << "@gprel(.CPI" << CurrentFnName << "_"
+ O << "@gprel(" << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_"
<< MO.getConstantPoolIndex() << ")";
return;
}
OpenPOWER on IntegriCloud