diff --git a/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp b/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp index 6f4455117a0..235028cf595 100644 --- a/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp +++ b/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp @@ -23,7 +23,6 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef TT) { PrivateGlobalPrefix = ".L"; AscizDirective = ".asciiz"; - WeakDefDirective = "\t.weak\t"; WeakRefDirective = "\t.weak\t"; // Debug diff --git a/test/CodeGen/XCore/linkage.ll b/test/CodeGen/XCore/linkage.ll new file mode 100644 index 00000000000..12915842394 --- /dev/null +++ b/test/CodeGen/XCore/linkage.ll @@ -0,0 +1,17 @@ +; RUN: llc < %s -march=xcore | FileCheck %s + +; CHECK: .weak fd +define weak void @fd() { + call void @fr(i32* @gd, i32* @gr) + ret void +} + +; CHECK: .weak gd +@gd = weak global i32 0 + +; CHECK: .weak gr +@gr = extern_weak global i32 + +; CHECK: .weak fr +declare extern_weak void @fr(i32*, i32*) +