summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRobert Lytton <robert@xmos.com>2013-09-09 10:41:57 +0000
committerRobert Lytton <robert@xmos.com>2013-09-09 10:41:57 +0000
commite453888379f8bb605c907ccc29c7098b7a8d7114 (patch)
tree0048438be21131e1492adbdd8fda226cf6590517 /llvm/test
parent1bcaeb24032f8ac265c89e06d9415b4b021b16aa (diff)
downloadbcm5719-llvm-e453888379f8bb605c907ccc29c7098b7a8d7114.tar.gz
bcm5719-llvm-e453888379f8bb605c907ccc29c7098b7a8d7114.zip
XCore target: fix weak linkage attribute handling
llvm-svn: 190298
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/XCore/linkage.ll17
1 files changed, 17 insertions, 0 deletions
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*)
+
OpenPOWER on IntegriCloud