summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit0d236450aa050e259006826b14e39cf05eb2efa6 (patch)
treeb9ec3f7817c6aea88094ec67ab88de7469a19b87 /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
parentafe6d7a17969500a80c30e19dcb085884bd480e1 (diff)
downloadbcm5719-llvm-0d236450aa050e259006826b14e39cf05eb2efa6.tar.gz
bcm5719-llvm-0d236450aa050e259006826b14e39cf05eb2efa6.zip
implement DarwinTargetAsmInfo::getSectionForFunction, use it when outputting
function bodies llvm-svn: 30733
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 4868b68435d..252109a4212 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud