[llvm] r190298 - XCore target: fix weak linkage attribute handling
Robert Lytton
robert at xmos.com
Mon Sep 9 03:41:58 PDT 2013
Author: rlytton
Date: Mon Sep 9 05:41:57 2013
New Revision: 190298
URL: http://llvm.org/viewvc/llvm-project?rev=190298&view=rev
Log:
XCore target: fix weak linkage attribute handling
Added:
llvm/trunk/test/CodeGen/XCore/linkage.ll
Modified:
llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp?rev=190298&r1=190297&r2=190298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp Mon Sep 9 05:41:57 2013
@@ -23,7 +23,6 @@ XCoreMCAsmInfo::XCoreMCAsmInfo(StringRef
PrivateGlobalPrefix = ".L";
AscizDirective = ".asciiz";
- WeakDefDirective = "\t.weak\t";
WeakRefDirective = "\t.weak\t";
// Debug
Added: llvm/trunk/test/CodeGen/XCore/linkage.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/linkage.ll?rev=190298&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/linkage.ll (added)
+++ llvm/trunk/test/CodeGen/XCore/linkage.ll Mon Sep 9 05:41:57 2013
@@ -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
+ at gd = weak global i32 0
+
+; CHECK: .weak gr
+ at gr = extern_weak global i32
+
+; CHECK: .weak fr
+declare extern_weak void @fr(i32*, i32*)
+
More information about the llvm-commits
mailing list