diff --git a/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp b/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp index 235028cf595..19b97efeaf0 100644 --- a/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp +++ b/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp @@ -25,6 +25,10 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef TT) { AscizDirective = ".asciiz"; WeakRefDirective = "\t.weak\t"; + HiddenVisibilityAttr = MCSA_Invalid; + HiddenDeclarationVisibilityAttr = MCSA_Invalid; + ProtectedVisibilityAttr = MCSA_Invalid; + // Debug HasLEB128 = true; } diff --git a/test/CodeGen/XCore/linkage.ll b/test/CodeGen/XCore/linkage.ll index 12915842394..659995155b7 100644 --- a/test/CodeGen/XCore/linkage.ll +++ b/test/CodeGen/XCore/linkage.ll @@ -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