aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Sparc/SparcAsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Sparc/SparcAsmPrinter.cpp')
-rw-r--r--lib/Target/Sparc/SparcAsmPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index bb4d6ae..424adaa 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -99,7 +99,7 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out the label for the function.
const Function *F = MF.getFunction();
- SwitchToTextSection(TAI->SectionForGlobal(F).c_str(), F);
+ SwitchToSection(TAI->SectionForGlobal(F));
EmitAlignment(4, F);
O << "\t.globl\t" << CurrentFnName << '\n';
@@ -242,7 +242,6 @@ void SparcAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
return;
O << "\n\n";
- std::string SectionName = TAI->SectionForGlobal(GVar);
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
unsigned Size = TD->getABITypeSize(C->getType());
@@ -250,7 +249,7 @@ void SparcAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
printVisibility(name, GVar->getVisibility());
- SwitchToDataSection(SectionName.c_str());
+ SwitchToSection(TAI->SectionForGlobal(GVar));
if (C->isNullValue() && !GVar->hasSection()) {
if (!GVar->isThreadLocal() &&