diff options
| -rw-r--r-- | llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp | 1 | ||||
| -rw-r--r-- | llvm/test/CodeGen/XCore/linkage.ll | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp b/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp index 6f4455117a0..235028cf595 100644 --- a/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp +++ b/llvm/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/llvm/test/CodeGen/XCore/linkage.ll b/llvm/test/CodeGen/XCore/linkage.ll new file mode 100644 index 00000000000..12915842394 --- /dev/null +++ b/llvm/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*) + |

