Handle visibility printing with all generality. Remove bunch of duplicate code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2008-08-08 18:25:07 +00:00
parent 382f002272
commit f5b6a47bb5
9 changed files with 40 additions and 48 deletions

View File

@@ -164,6 +164,8 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
break;
}
printVisibility(CurrentFnName, F->getVisibility());
O << "\t.ent " << CurrentFnName << "\n";
O << CurrentFnName << ":\n";
@@ -221,8 +223,7 @@ void AlphaAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
SwitchToDataSection(SectionName.c_str());
// 1: Check visibility
if (GVar->hasHiddenVisibility())
O << TAI->getHiddenDirective() << name << "\n";
printVisibility(name, GVar->getVisibility());
// 2: Kind
switch (GVar->getLinkage()) {