diff options
| author | Robert Lytton <robert@xmos.com> | 2013-09-09 10:41:57 +0000 |
|---|---|---|
| committer | Robert Lytton <robert@xmos.com> | 2013-09-09 10:41:57 +0000 |
| commit | e453888379f8bb605c907ccc29c7098b7a8d7114 (patch) | |
| tree | 0048438be21131e1492adbdd8fda226cf6590517 | |
| parent | 1bcaeb24032f8ac265c89e06d9415b4b021b16aa (diff) | |
| download | bcm5719-llvm-e453888379f8bb605c907ccc29c7098b7a8d7114.tar.gz bcm5719-llvm-e453888379f8bb605c907ccc29c7098b7a8d7114.zip | |
XCore target: fix weak linkage attribute handling
llvm-svn: 190298
| -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*) + |

