mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
add support for hidden visibility to darwin/ppc and linux/ppc targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -550,6 +550,11 @@ bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
O << "\t.weak\t" << CurrentFnName << '\n';
|
O << "\t.weak\t" << CurrentFnName << '\n';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (F->hasHiddenVisibility())
|
||||||
|
if (const char *Directive = TAI->getHiddenDirective())
|
||||||
|
O << Directive << CurrentFnName << "\n";
|
||||||
|
|
||||||
EmitAlignment(2, F);
|
EmitAlignment(2, F);
|
||||||
O << CurrentFnName << ":\n";
|
O << CurrentFnName << ":\n";
|
||||||
|
|
||||||
@@ -608,8 +613,13 @@ bool LinuxAsmPrinter::doFinalization(Module &M) {
|
|||||||
// Check to see if this is a special global used by LLVM, if so, emit it.
|
// Check to see if this is a special global used by LLVM, if so, emit it.
|
||||||
if (EmitSpecialLLVMGlobal(I))
|
if (EmitSpecialLLVMGlobal(I))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::string name = Mang->getValueName(I);
|
std::string name = Mang->getValueName(I);
|
||||||
|
|
||||||
|
if (I->hasHiddenVisibility())
|
||||||
|
if (const char *Directive = TAI->getHiddenDirective())
|
||||||
|
O << Directive << name << "\n";
|
||||||
|
|
||||||
Constant *C = I->getInitializer();
|
Constant *C = I->getInitializer();
|
||||||
unsigned Size = TD->getTypeSize(C->getType());
|
unsigned Size = TD->getTypeSize(C->getType());
|
||||||
unsigned Align = TD->getPreferredAlignmentLog(I);
|
unsigned Align = TD->getPreferredAlignmentLog(I);
|
||||||
@@ -749,6 +759,11 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
O << "\t.weak_definition\t" << CurrentFnName << "\n";
|
O << "\t.weak_definition\t" << CurrentFnName << "\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (F->hasHiddenVisibility())
|
||||||
|
if (const char *Directive = TAI->getHiddenDirective())
|
||||||
|
O << Directive << CurrentFnName << "\n";
|
||||||
|
|
||||||
EmitAlignment(4, F);
|
EmitAlignment(4, F);
|
||||||
O << CurrentFnName << ":\n";
|
O << CurrentFnName << ":\n";
|
||||||
|
|
||||||
@@ -840,6 +855,11 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::string name = Mang->getValueName(I);
|
std::string name = Mang->getValueName(I);
|
||||||
|
|
||||||
|
if (I->hasHiddenVisibility())
|
||||||
|
if (const char *Directive = TAI->getHiddenDirective())
|
||||||
|
O << Directive << name << "\n";
|
||||||
|
|
||||||
Constant *C = I->getInitializer();
|
Constant *C = I->getInitializer();
|
||||||
unsigned Size = TD->getTypeSize(C->getType());
|
unsigned Size = TD->getTypeSize(C->getType());
|
||||||
unsigned Align = TD->getPreferredAlignmentLog(I);
|
unsigned Align = TD->getPreferredAlignmentLog(I);
|
||||||
|
@@ -55,6 +55,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM)
|
|||||||
StaticDtorsSection = ".mod_term_func";
|
StaticDtorsSection = ".mod_term_func";
|
||||||
UsedDirective = "\t.no_dead_strip\t";
|
UsedDirective = "\t.no_dead_strip\t";
|
||||||
WeakRefDirective = "\t.weak_reference\t";
|
WeakRefDirective = "\t.weak_reference\t";
|
||||||
|
HiddenDirective = "\t.private_extern\t";
|
||||||
}
|
}
|
||||||
|
|
||||||
LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM)
|
LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM)
|
||||||
|
Reference in New Issue
Block a user