aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-21 06:55:27 +0000
committerChris Lattner <sabre@nondot.org>2005-11-21 06:55:27 +0000
commit62cbf2aab9fd5366281871974ef580fd072309cc (patch)
treedc2c62e242908bd048adf4cfc60399c0115f1a0a
parent81a994e42ea8e2f92a58684cbed8a855bcdb85fc (diff)
Rename SwitchSection -> switchSection to avoid conflicting with a future
change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24443 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/Alpha/AlphaAsmPrinter.cpp20
-rw-r--r--lib/Target/IA64/IA64AsmPrinter.cpp12
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp8
-rwxr-xr-xlib/Target/X86/X86AsmPrinter.h4
4 files changed, 22 insertions, 22 deletions
diff --git a/lib/Target/Alpha/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AlphaAsmPrinter.cpp
index e902b2d597..b1801fd4af 100644
--- a/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -66,7 +66,7 @@ namespace {
bool runOnMachineFunction(MachineFunction &F);
bool doInitialization(Module &M);
bool doFinalization(Module &M);
- void SwitchSection(std::ostream &OS, const char *NewSection);
+ void switchSection(std::ostream &OS, const char *NewSection);
};
} // end of anonymous namespace
@@ -180,7 +180,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
printConstantPool(MF.getConstantPool());
// Print out labels for the function.
- SwitchSection(O, "text");
+ switchSection(O, "text");
emitAlignment(4);
O << "\t.globl " << CurrentFnName << "\n";
O << "\t.ent " << CurrentFnName << "\n";
@@ -220,9 +220,9 @@ void AlphaAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
if (CP.empty()) return;
- SwitchSection(O, "rodata");
+ switchSection(O, "rodata");
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
- // SwitchSection(O, "section .rodata, \"dr\"");
+ // switchSection(O, "section .rodata, \"dr\"");
emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i
<< ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
@@ -243,10 +243,10 @@ bool AlphaAsmPrinter::doInitialization(Module &M)
}
-// SwitchSection - Switch to the specified section of the executable if we are
+// switchSection - Switch to the specified section of the executable if we are
// not already in it!
//
-void AlphaAsmPrinter::SwitchSection(std::ostream &OS, const char *NewSection)
+void AlphaAsmPrinter::switchSection(std::ostream &OS, const char *NewSection)
{
if (CurSection != NewSection) {
CurSection = NewSection;
@@ -269,7 +269,7 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
if (C->isNullValue() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
I->hasWeakLinkage() /* FIXME: Verify correct */)) {
- SwitchSection(O, "data");
+ switchSection(O, "data");
if (I->hasInternalLinkage())
O << "\t.local " << name << "\n";
@@ -284,7 +284,7 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak.
// Nonnull linkonce -> weak
O << "\t.weak " << name << "\n";
- SwitchSection(O, "");
+ switchSection(O, "");
O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\",@progbits\n";
break;
case GlobalValue::AppendingLinkage:
@@ -296,9 +296,9 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
// FALL THROUGH
case GlobalValue::InternalLinkage:
if (C->isNullValue())
- SwitchSection(O, "bss");
+ switchSection(O, "bss");
else
- SwitchSection(O, "data");
+ switchSection(O, "data");
break;
case GlobalValue::GhostLinkage:
std::cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n";
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp
index b024a0f21c..8f3c2581c3 100644
--- a/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -61,10 +61,10 @@ static bool isMem(const MachineInstr *MI, unsigned Op) {
MI->getOperand(Op+3).isGlobalAddress());
}
-// SwitchSection - Switch to the specified section of the executable if we are
+// switchSection - Switch to the specified section of the executable if we are
// not already in it!
//
-static void SwitchSection(std::ostream &OS, std::string &CurSection,
+static void switchSection(std::ostream &OS, std::string &CurSection,
const char *NewSection) {
if (CurSection != NewSection) {
CurSection = NewSection;
@@ -111,7 +111,7 @@ bool IA64SharedAsmPrinter::doFinalization(Module &M) {
if (C->isNullValue() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
I->hasWeakLinkage() /* FIXME: Verify correct */)) {
- SwitchSection(O, CurSection, ".data");
+ switchSection(O, CurSection, ".data");
if (I->hasInternalLinkage()) {
O << "\t.lcomm " << name << "," << TD.getTypeSize(C->getType())
<< "," << (1 << Align);
@@ -129,7 +129,7 @@ bool IA64SharedAsmPrinter::doFinalization(Module &M) {
case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak.
// Nonnull linkonce -> weak
O << "\t.weak " << name << "\n";
- SwitchSection(O, CurSection, "");
+ switchSection(O, CurSection, "");
O << "\t.section\t.llvm.linkonce.d." << name
<< ", \"aw\", \"progbits\"\n";
break;
@@ -142,9 +142,9 @@ bool IA64SharedAsmPrinter::doFinalization(Module &M) {
// FALL THROUGH
case GlobalValue::InternalLinkage:
if (C->isNullValue())
- SwitchSection(O, CurSection, ".bss");
+ switchSection(O, CurSection, ".bss");
else
- SwitchSection(O, CurSection, ".data");
+ switchSection(O, CurSection, ".data");
break;
case GlobalValue::GhostLinkage:
std::cerr << "GhostLinkage cannot appear in IA64AsmPrinter!\n";
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 18c7c4b81b..af805766db 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -120,7 +120,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
if (C->isNullValue() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
I->hasWeakLinkage() /* FIXME: Verify correct */)) {
- SwitchSection(O, CurSection, ".data");
+ switchSection(O, CurSection, ".data");
if (!forCygwin && !forDarwin && I->hasInternalLinkage())
O << "\t.local " << name << "\n";
if (forDarwin && I->hasInternalLinkage())
@@ -139,7 +139,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak.
// Nonnull linkonce -> weak
O << "\t.weak " << name << "\n";
- SwitchSection(O, CurSection, "");
+ switchSection(O, CurSection, "");
O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\",@progbits\n";
break;
case GlobalValue::AppendingLinkage:
@@ -151,9 +151,9 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
// FALL THROUGH
case GlobalValue::InternalLinkage:
if (C->isNullValue())
- SwitchSection(O, CurSection, ".bss");
+ switchSection(O, CurSection, ".bss");
else
- SwitchSection(O, CurSection, ".data");
+ switchSection(O, CurSection, ".data");
break;
}
diff --git a/lib/Target/X86/X86AsmPrinter.h b/lib/Target/X86/X86AsmPrinter.h
index 4f53de8fb5..06b4225c32 100755
--- a/lib/Target/X86/X86AsmPrinter.h
+++ b/lib/Target/X86/X86AsmPrinter.h
@@ -56,9 +56,9 @@ struct X86SharedAsmPrinter : public AsmPrinter {
MI->getOperand(Op+3).isGlobalAddress());
}
- // SwitchSection - Switch to the specified section of the executable if we are
+ // switchSection - Switch to the specified section of the executable if we are
// not already in it!
- inline static void SwitchSection(std::ostream &OS, std::string &CurSection,
+ inline static void switchSection(std::ostream &OS, std::string &CurSection,
const char *NewSection) {
if (CurSection != NewSection) {
CurSection = NewSection;