aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-08-08 18:25:07 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-08-08 18:25:07 +0000
commitf5b6a47bb57fb5ffc734416d4d5d993e1a06273b (patch)
treedda81f3507c9be0dfebf5e749923a6bd75722b68 /lib/Target/Mips
parent382f0022726bff5ed088a171005c1ebde3635925 (diff)
downloadexternal_llvm-f5b6a47bb57fb5ffc734416d4d5d993e1a06273b.zip
external_llvm-f5b6a47bb57fb5ffc734416d4d5d993e1a06273b.tar.gz
external_llvm-f5b6a47bb57fb5ffc734416d4d5d993e1a06273b.tar.bz2
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
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/MipsAsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp
index 0d222f1..42979fc 100644
--- a/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -237,6 +237,8 @@ emitFunctionStart(MachineFunction &MF)
O << "\t.globl\t" << CurrentFnName << '\n';
O << "\t.ent\t" << CurrentFnName << '\n';
+ printVisibility(CurrentFnName, F->getVisibility());
+
if ((TAI->hasDotTypeDotSizeDirective()) && Subtarget->isLinux())
O << "\t.type\t" << CurrentFnName << ", @function\n";
@@ -497,7 +499,7 @@ printModuleLevelGV(const GlobalVariable* GVar) {
} else
Align = TD->getPreferredTypeAlignmentShift(CTy);
- // FIXME: ELF supports visibility
+ printVisibility(name, GVar->getVisibility());
SwitchToDataSection(SectionName.c_str());
@@ -508,7 +510,7 @@ printModuleLevelGV(const GlobalVariable* GVar) {
if (GVar->hasInternalLinkage())
O << "\t.local\t" << name << '\n';
-
+
O << TAI->getCOMMDirective() << name << ',' << Size;
if (TAI->getCOMMDirectiveTakesAlignment())
O << ',' << (1 << Align);