aboutsummaryrefslogtreecommitdiffstats
path: root/test/Other
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-25 05:20:58 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-25 05:20:58 +0000
commit3343ddf466b414f811048dc9f3be2d55ffbb9658 (patch)
tree1861095166c17292aa23e4e9eaf4e9eb32966f85 /test/Other
parent16f81f783207fa359f3afc589e2135d4805c9b98 (diff)
downloadexternal_llvm-3343ddf466b414f811048dc9f3be2d55ffbb9658.zip
external_llvm-3343ddf466b414f811048dc9f3be2d55ffbb9658.tar.gz
external_llvm-3343ddf466b414f811048dc9f3be2d55ffbb9658.tar.bz2
Merging r195477:
------------------------------------------------------------------------ r195477 | rafael | 2013-11-22 09:58:12 -0800 (Fri, 22 Nov 2013) | 13 lines Add a fixed version of r195470 back. The fix is simply to use CurI instead of I when handling aliases to avoid accessing a invalid iterator. original message: Convert linkonce* to weak* instead of strong. Also refactor the logic into a helper function. This is an important improve on mingw where the linker complains about mixed weak and strong symbols. Converting to weak ensures that the symbol is not dropped, but keeps in a comdat, making the linker happy. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/extract-linkonce.ll11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/Other/extract-linkonce.ll b/test/Other/extract-linkonce.ll
index 31fbf3a..4c6b6b7 100644
--- a/test/Other/extract-linkonce.ll
+++ b/test/Other/extract-linkonce.ll
@@ -1,15 +1,16 @@
; RUN: llvm-extract -func foo -S < %s | FileCheck %s
; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s
-; Test that we don't convert weak_odr to external definitions.
+; Test that linkonce definitions are mapped to weak so that they are not
+; dropped.
-; CHECK: @bar = external hidden global i32
-; CHECK: define hidden i32* @foo() {
+; CHECK: @bar = external global i32
+; CHECK: define weak i32* @foo() {
; CHECK-NEXT: ret i32* @bar
; CHECK-NEXT: }
-; DELETE: @bar = hidden global i32 42
-; DELETE: declare hidden i32* @foo()
+; DELETE: @bar = weak global i32 42
+; DELETE: declare i32* @foo()
@bar = linkonce global i32 42