[llvm] r192433 - XCore target does not emit '.hidden' or '.protected' attributes

Robert Lytton robert at xmos.com
Fri Oct 11 03:27:00 PDT 2013


Author: rlytton
Date: Fri Oct 11 05:27:00 2013
New Revision: 192433

URL: http://llvm.org/viewvc/llvm-project?rev=192433&view=rev
Log:
XCore target does not emit '.hidden' or '.protected' attributes

Modified:
    llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
    llvm/trunk/test/CodeGen/XCore/linkage.ll

Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp?rev=192433&r1=192432&r2=192433&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp Fri Oct 11 05:27:00 2013
@@ -25,6 +25,10 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef
   AscizDirective = ".asciiz";
   WeakRefDirective = "\t.weak\t";
 
+  HiddenVisibilityAttr = MCSA_Invalid;
+  HiddenDeclarationVisibilityAttr = MCSA_Invalid;
+  ProtectedVisibilityAttr = MCSA_Invalid;
+
   // Debug
   HasLEB128 = true;
 }

Modified: llvm/trunk/test/CodeGen/XCore/linkage.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/linkage.ll?rev=192433&r1=192432&r2=192433&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/linkage.ll (original)
+++ llvm/trunk/test/CodeGen/XCore/linkage.ll Fri Oct 11 05:27:00 2013
@@ -6,6 +6,16 @@ define weak void @fd() {
   ret void
 }
 
+; CHECK-NOT: .hidden
+define hidden void @test_hidden() {
+  unreachable
+}
+
+; CHECK-NOT: .protected
+define protected void @test_protected() {
+  unreachable
+}
+
 ; CHECK: .weak gd
 @gd = weak global i32 0
 





More information about the llvm-commits mailing list