mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-03 18:32:50 +00:00
hoist some common code out of a switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
43ee5f7c08
commit
865aaf00ad
@ -169,23 +169,22 @@ void X86ATTAsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
|
||||
DecorateCygMingName(CurrentFnName, F);
|
||||
|
||||
SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
|
||||
EmitAlignment(FnAlign, F);
|
||||
|
||||
switch (F->getLinkage()) {
|
||||
default: llvm_unreachable("Unknown linkage type!");
|
||||
case Function::InternalLinkage: // Symbols default to internal.
|
||||
case Function::PrivateLinkage:
|
||||
case Function::LinkerPrivateLinkage:
|
||||
EmitAlignment(FnAlign, F);
|
||||
break;
|
||||
case Function::DLLExportLinkage:
|
||||
case Function::ExternalLinkage:
|
||||
EmitAlignment(FnAlign, F);
|
||||
O << "\t.globl\t" << CurrentFnName << '\n';
|
||||
break;
|
||||
case Function::LinkOnceAnyLinkage:
|
||||
case Function::LinkOnceODRLinkage:
|
||||
case Function::WeakAnyLinkage:
|
||||
case Function::WeakODRLinkage:
|
||||
EmitAlignment(FnAlign, F);
|
||||
if (Subtarget->isTargetDarwin()) {
|
||||
O << "\t.globl\t" << CurrentFnName << '\n';
|
||||
O << TAI->getWeakDefDirective() << CurrentFnName << '\n';
|
||||
|
Loading…
x
Reference in New Issue
Block a user