mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Enable protected visibility on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
126b1b8683
commit
0a1817392d
@ -210,9 +210,14 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
break;
|
||||
}
|
||||
|
||||
const char *VisibilityDirective = NULL;
|
||||
if (F->hasHiddenVisibility())
|
||||
if (const char *Directive = TAI->getHiddenDirective())
|
||||
O << Directive << CurrentFnName << "\n";
|
||||
VisibilityDirective = TAI->getHiddenDirective();
|
||||
else if (F->hasProtectedVisibility())
|
||||
VisibilityDirective = TAI->getProtectedDirective();
|
||||
|
||||
if (VisibilityDirective)
|
||||
O << VisibilityDirective << CurrentFnName << "\n";
|
||||
|
||||
if (AFI->isThumbFunction()) {
|
||||
EmitAlignment(AFI->getAlign(), F);
|
||||
@ -791,9 +796,15 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
|
||||
unsigned Size = TD->getTypeSize(Type);
|
||||
unsigned Align = TD->getPreferredAlignmentLog(I);
|
||||
|
||||
const char *VisibilityDirective = NULL;
|
||||
if (I->hasHiddenVisibility())
|
||||
if (const char *Directive = TAI->getHiddenDirective())
|
||||
O << Directive << name << "\n";
|
||||
VisibilityDirective = TAI->getHiddenDirective();
|
||||
else if (I->hasProtectedVisibility())
|
||||
VisibilityDirective = TAI->getProtectedDirective();
|
||||
|
||||
if (VisibilityDirective)
|
||||
O << VisibilityDirective << name << "\n";
|
||||
|
||||
if (Subtarget->isTargetELF())
|
||||
O << "\t.type " << name << ",%object\n";
|
||||
|
||||
|
@ -27,6 +27,7 @@ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) {
|
||||
SetDirective = "\t.set";
|
||||
WeakRefDirective = "\t.weak_reference\t";
|
||||
HiddenDirective = "\t.private_extern\t";
|
||||
ProtectedDirective = NULL;
|
||||
JumpTableDataSection = ".const";
|
||||
CStringSection = "\t.cstring";
|
||||
FourByteConstantSection = "\t.literal4\n";
|
||||
|
Loading…
Reference in New Issue
Block a user