mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 15:36:21 +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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *VisibilityDirective = NULL;
|
||||||
if (F->hasHiddenVisibility())
|
if (F->hasHiddenVisibility())
|
||||||
if (const char *Directive = TAI->getHiddenDirective())
|
VisibilityDirective = TAI->getHiddenDirective();
|
||||||
O << Directive << CurrentFnName << "\n";
|
else if (F->hasProtectedVisibility())
|
||||||
|
VisibilityDirective = TAI->getProtectedDirective();
|
||||||
|
|
||||||
|
if (VisibilityDirective)
|
||||||
|
O << VisibilityDirective << CurrentFnName << "\n";
|
||||||
|
|
||||||
if (AFI->isThumbFunction()) {
|
if (AFI->isThumbFunction()) {
|
||||||
EmitAlignment(AFI->getAlign(), F);
|
EmitAlignment(AFI->getAlign(), F);
|
||||||
@ -791,9 +796,15 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
|
|||||||
unsigned Size = TD->getTypeSize(Type);
|
unsigned Size = TD->getTypeSize(Type);
|
||||||
unsigned Align = TD->getPreferredAlignmentLog(I);
|
unsigned Align = TD->getPreferredAlignmentLog(I);
|
||||||
|
|
||||||
|
const char *VisibilityDirective = NULL;
|
||||||
if (I->hasHiddenVisibility())
|
if (I->hasHiddenVisibility())
|
||||||
if (const char *Directive = TAI->getHiddenDirective())
|
VisibilityDirective = TAI->getHiddenDirective();
|
||||||
O << Directive << name << "\n";
|
else if (I->hasProtectedVisibility())
|
||||||
|
VisibilityDirective = TAI->getProtectedDirective();
|
||||||
|
|
||||||
|
if (VisibilityDirective)
|
||||||
|
O << VisibilityDirective << name << "\n";
|
||||||
|
|
||||||
if (Subtarget->isTargetELF())
|
if (Subtarget->isTargetELF())
|
||||||
O << "\t.type " << name << ",%object\n";
|
O << "\t.type " << name << ",%object\n";
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) {
|
|||||||
SetDirective = "\t.set";
|
SetDirective = "\t.set";
|
||||||
WeakRefDirective = "\t.weak_reference\t";
|
WeakRefDirective = "\t.weak_reference\t";
|
||||||
HiddenDirective = "\t.private_extern\t";
|
HiddenDirective = "\t.private_extern\t";
|
||||||
|
ProtectedDirective = NULL;
|
||||||
JumpTableDataSection = ".const";
|
JumpTableDataSection = ".const";
|
||||||
CStringSection = "\t.cstring";
|
CStringSection = "\t.cstring";
|
||||||
FourByteConstantSection = "\t.literal4\n";
|
FourByteConstantSection = "\t.literal4\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user