add support for hidden visibility to darwin/x86

llvm-svn: 33198
This commit is contained in:
Chris Lattner 2007-01-14 06:29:53 +00:00
parent a8f6e90cac
commit f43ad084b8
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";