add support for hidden visibility to darwin/x86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-01-14 06:29:53 +00:00
parent 9784bc73c3
commit 43bbc5c38f
3 changed files with 7 additions and 4 deletions

View File

@ -125,8 +125,9 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
}
break;
}
if (F->hasHiddenVisibility() && !Subtarget->isTargetDarwin())
O << "\t.hidden " << CurrentFnName << "\n";
if (F->hasHiddenVisibility())
if (const char *Directive = TAI->getHiddenDirective())
O << Directive << CurrentFnName << "\n";
O << CurrentFnName << ":\n";
// Add some workaround for linkonce linkage on Cygwin\MinGW

View File

@ -246,8 +246,9 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
EmitGlobalConstant(C);
O << '\n';
}
if (I->hasHiddenVisibility() && !Subtarget->isTargetDarwin())
O << "\t.hidden " << name << "\n";
if (I->hasHiddenVisibility())
if (const char *Directive = TAI->getHiddenDirective())
O << Directive << name << "\n";
}
// Output linker support code for dllexported globals

View File

@ -64,6 +64,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
SetDirective = "\t.set";
UsedDirective = "\t.no_dead_strip\t";
WeakRefDirective = "\t.weak_reference\t";
HiddenDirective = "\t.private_extern\t";
NeedsSet = true;
DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";