From 1a9edae76b2e7cf15c5f7c36928b3701ac2ef47b Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 24 Sep 2008 22:14:23 +0000 Subject: Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56573 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/IA64/IA64AsmPrinter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Target/IA64/IA64AsmPrinter.cpp') diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp index ff33125..0d04bf5 100644 --- a/lib/Target/IA64/IA64AsmPrinter.cpp +++ b/lib/Target/IA64/IA64AsmPrinter.cpp @@ -130,7 +130,7 @@ bool IA64AsmPrinter::runOnMachineFunction(MachineFunction &MF) { EmitConstantPool(MF.getConstantPool()); const Function *F = MF.getFunction(); - SwitchToTextSection(TAI->SectionForGlobal(F).c_str(), F); + SwitchToSection(TAI->SectionForGlobal(F)); // Print out labels for the function. EmitAlignment(5); @@ -264,7 +264,6 @@ void IA64AsmPrinter::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()); @@ -272,7 +271,7 @@ void IA64AsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { printVisibility(name, GVar->getVisibility()); - SwitchToDataSection(SectionName.c_str()); + SwitchToSection(TAI->SectionForGlobal(GVar)); if (C->isNullValue() && !GVar->hasSection()) { if (!GVar->isThreadLocal() && -- cgit v1.1