Split SwitchSection into SwitchTo{Text|Data}Section methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28184 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp
index 13c2dfb..2ebe010 100644
--- a/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -142,7 +142,8 @@
EmitConstantPool(MF.getConstantPool());
// Print out labels for the function.
- SwitchSection("\n\t.section .text, \"ax\", \"progbits\"\n", MF.getFunction());
+ SwitchToTextSection("\n\t.section .text, \"ax\", \"progbits\"\n",
+ MF.getFunction());
// ^^ means "Allocated instruXions in mem, initialized"
EmitAlignment(5);
O << "\t.global\t" << CurrentFnName << "\n";
@@ -282,7 +283,7 @@
if (C->isNullValue() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
I->hasWeakLinkage() /* FIXME: Verify correct */)) {
- SwitchSection(".data", I);
+ SwitchToDataSection(".data", I);
if (I->hasInternalLinkage()) {
O << "\t.lcomm " << name << "#," << TD->getTypeSize(C->getType())
<< "," << (1 << Align);
@@ -302,7 +303,7 @@
O << "\t.weak " << name << "\n";
O << "\t.section\t.llvm.linkonce.d." << name
<< ", \"aw\", \"progbits\"\n";
- SwitchSection("", I);
+ SwitchToDataSection("", I);
break;
case GlobalValue::AppendingLinkage:
// FIXME: appending linkage variables should go into a section of
@@ -312,7 +313,7 @@
O << "\t.global " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- SwitchSection(C->isNullValue() ? ".bss" : ".data", I);
+ SwitchToDataSection(C->isNullValue() ? ".bss" : ".data", I);
break;
case GlobalValue::GhostLinkage:
std::cerr << "GhostLinkage cannot appear in IA64AsmPrinter!\n";