diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-27 00:17:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-27 00:17:20 +0000 |
commit | 7eb11560b6a70454cfcec865694b3d6b05b448bf (patch) | |
tree | c3a9507594580848a4add265964e818f55633ed3 /lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | |
parent | 7ec59284eaf6dc3fdd2e6df1503fee4255d8c0d3 (diff) | |
download | external_llvm-7eb11560b6a70454cfcec865694b3d6b05b448bf.tar.gz external_llvm-7eb11560b6a70454cfcec865694b3d6b05b448bf.tar.bz2 external_llvm-7eb11560b6a70454cfcec865694b3d6b05b448bf.zip |
Switch MSP430, CellSPU, SystemZ, Darwin/PPC, Alpha, and Sparc to
EmitFunctionHeader:
7 files changed, 16 insertions(+), 210 deletions(-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp')
-rw-r--r-- | lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index 922ea1a180..dae435b715 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -601,6 +601,8 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { SetupMachineFunction(MF); O << "\n\n"; + EmitFunctionHeader(); + // Print out constants referenced by the function EmitConstantPool(MF.getConstantPool()); @@ -702,38 +704,7 @@ bool PPCDarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { SetupMachineFunction(MF); O << "\n\n"; - // Print out constants referenced by the function - EmitConstantPool(MF.getConstantPool()); - - // Print out labels for the function. - const Function *F = MF.getFunction(); - OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM)); - - switch (F->getLinkage()) { - default: llvm_unreachable("Unknown linkage type!"); - case Function::PrivateLinkage: - case Function::InternalLinkage: // Symbols default to internal. - break; - case Function::ExternalLinkage: - O << "\t.globl\t" << *CurrentFnSym << '\n'; - break; - case Function::WeakAnyLinkage: - case Function::WeakODRLinkage: - case Function::LinkOnceAnyLinkage: - case Function::LinkOnceODRLinkage: - case Function::LinkerPrivateLinkage: - O << "\t.globl\t" << *CurrentFnSym << '\n'; - O << "\t.weak_definition\t" << *CurrentFnSym << '\n'; - break; - } - - printVisibility(CurrentFnSym, F->getVisibility()); - - EmitAlignment(MF.getAlignment(), F); - O << *CurrentFnSym << ":\n"; - - // Emit pre-function debug information. - DW->BeginFunction(&MF); + EmitFunctionHeader(); // If the function is empty, then we need to emit *something*. Otherwise, the // function's label might be associated with something that it wasn't meant to |