mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user