MCize a bunch more stuff, eliminating a lot of uses of the mangler

and CurrentFnName.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93594 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-16 00:21:18 +00:00
parent 89a9c91247
commit 12164414dd
10 changed files with 367 additions and 196 deletions
@@ -99,20 +99,27 @@ void SystemZAsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
case Function::LinkerPrivateLinkage:
break;
case Function::ExternalLinkage:
O << "\t.globl\t" << CurrentFnName << '\n';
O << "\t.globl\t";
CurrentFnSym->print(O, MAI);
O << '\n';
break;
case Function::LinkOnceAnyLinkage:
case Function::LinkOnceODRLinkage:
case Function::WeakAnyLinkage:
case Function::WeakODRLinkage:
O << "\t.weak\t" << CurrentFnName << '\n';
O << "\t.weak\t";
CurrentFnSym->print(O, MAI);
O << '\n';
break;
}
printVisibility(CurrentFnName, F->getVisibility());
printVisibility(CurrentFnSym, F->getVisibility());
O << "\t.type\t" << CurrentFnName << ",@function\n"
<< CurrentFnName << ":\n";
O << "\t.type\t";
CurrentFnSym->print(O, MAI);
O << ",@function\n";
CurrentFnSym->print(O, MAI);
O << ":\n";
}
bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
@@ -137,8 +144,13 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
printMachineInstruction(II);
}
if (MAI->hasDotTypeDotSizeDirective())
O << "\t.size\t" << CurrentFnName << ", .-" << CurrentFnName << '\n';
if (MAI->hasDotTypeDotSizeDirective()) {
O << "\t.size\t";
CurrentFnSym->print(O, MAI);
O << ", .-";
CurrentFnSym->print(O, MAI);
O << '\n';
}
// Print out jump tables referenced by the function.
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);