add a version of AsmPrinter::printVisibility that takes an MCSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93587 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-15 23:38:51 +00:00
parent f0aacf8201
commit 53d4d78d9a
3 changed files with 21 additions and 4 deletions

View File

@ -1856,6 +1856,23 @@ void AsmPrinter::printVisibility(const std::string& Name,
}
}
void AsmPrinter::printVisibility(const MCSymbol *Sym,
unsigned Visibility) const {
if (Visibility == GlobalValue::HiddenVisibility) {
if (const char *Directive = MAI->getHiddenDirective()) {
O << Directive;
Sym->print(O, MAI);
O << '\n';
}
} else if (Visibility == GlobalValue::ProtectedVisibility) {
if (const char *Directive = MAI->getProtectedDirective()) {
O << Directive;
Sym->print(O, MAI);
O << '\n';
}
}
}
void AsmPrinter::printOffset(int64_t Offset) const {
if (Offset > 0)
O << '+' << Offset;