[llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMTargetAsmInfo.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Sun Apr 29 17:24:09 PDT 2007
Changes in directory llvm/lib/Target/ARM:
ARMAsmPrinter.cpp updated: 1.68 -> 1.69
ARMTargetAsmInfo.cpp updated: 1.16 -> 1.17
---
Log message:
Enable protected visibility on ARM.
---
Diffs of the changes: (+16 -4)
ARMAsmPrinter.cpp | 19 +++++++++++++++----
ARMTargetAsmInfo.cpp | 1 +
2 files changed, 16 insertions(+), 4 deletions(-)
Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.68 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.69
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.68 Fri Apr 27 08:54:47 2007
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Sun Apr 29 19:23:51 2007
@@ -210,9 +210,14 @@
break;
}
+ const char *VisibilityDirective = NULL;
if (F->hasHiddenVisibility())
- if (const char *Directive = TAI->getHiddenDirective())
- O << Directive << CurrentFnName << "\n";
+ VisibilityDirective = TAI->getHiddenDirective();
+ else if (F->hasProtectedVisibility())
+ VisibilityDirective = TAI->getProtectedDirective();
+
+ if (VisibilityDirective)
+ O << VisibilityDirective << CurrentFnName << "\n";
if (AFI->isThumbFunction()) {
EmitAlignment(AFI->getAlign(), F);
@@ -791,9 +796,15 @@
unsigned Size = TD->getTypeSize(Type);
unsigned Align = TD->getPreferredAlignmentLog(I);
+ const char *VisibilityDirective = NULL;
if (I->hasHiddenVisibility())
- if (const char *Directive = TAI->getHiddenDirective())
- O << Directive << name << "\n";
+ VisibilityDirective = TAI->getHiddenDirective();
+ else if (I->hasProtectedVisibility())
+ VisibilityDirective = TAI->getProtectedDirective();
+
+ if (VisibilityDirective)
+ O << VisibilityDirective << name << "\n";
+
if (Subtarget->isTargetELF())
O << "\t.type " << name << ",%object\n";
Index: llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
diff -u llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.16 llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.17
--- llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.16 Sun Apr 29 14:17:45 2007
+++ llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp Sun Apr 29 19:23:51 2007
@@ -27,6 +27,7 @@
SetDirective = "\t.set";
WeakRefDirective = "\t.weak_reference\t";
HiddenDirective = "\t.private_extern\t";
+ ProtectedDirective = NULL;
JumpTableDataSection = ".const";
CStringSection = "\t.cstring";
FourByteConstantSection = "\t.literal4\n";
More information about the llvm-commits
mailing list