aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-05 00:35:50 +0000
committerChris Lattner <sabre@nondot.org>2006-10-05 00:35:50 +0000
commitb56dcc453e1bd3fc75e4393b3b1bd1b07d86903e (patch)
treeb81333dfa02adb087b5de7cdb03eda74b355292c /lib/Target/PowerPC/PPCAsmPrinter.cpp
parentf5b10ec509d7e27df12372e53adeda59051dfc30 (diff)
downloadexternal_llvm-b56dcc453e1bd3fc75e4393b3b1bd1b07d86903e.zip
external_llvm-b56dcc453e1bd3fc75e4393b3b1bd1b07d86903e.tar.gz
external_llvm-b56dcc453e1bd3fc75e4393b3b1bd1b07d86903e.tar.bz2
implement DarwinTargetAsmInfo::getSectionForFunction, use it when outputting
function bodies git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 4868b68..252109a 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -422,19 +422,17 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function.
const Function *F = MF.getFunction();
+ SwitchToTextSection(TAI->getSectionForFunction(*F), F);
+
switch (F->getLinkage()) {
default: assert(0 && "Unknown linkage type!");
case Function::InternalLinkage: // Symbols default to internal.
- SwitchToTextSection("\t.text", F);
break;
case Function::ExternalLinkage:
- SwitchToTextSection("\t.text", F);
O << "\t.globl\t" << CurrentFnName << "\n";
break;
case Function::WeakLinkage:
case Function::LinkOnceLinkage:
- SwitchToTextSection(
- ".section __TEXT,__textcoal_nt,coalesced,pure_instructions", F);
O << "\t.globl\t" << CurrentFnName << "\n";
O << "\t.weak_definition\t" << CurrentFnName << "\n";
break;