summaryrefslogtreecommitdiff
path: root/test/Linker/testlink.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-12-08 18:45:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-12-08 18:45:16 +0000
commit7fd7effa372caf6e329f5c78b4e6cf13adf7e314 (patch)
treeed3225ff6a8c1e67c522a6453c2ae29a7a4358f6 /test/Linker/testlink.ll
parent47725023179371d58cb9419565434c65a73e9aae (diff)
Lazily link GlobalVariables and GlobalAliases.
We were already lazily linking functions, but all GlobalValues can be treated uniformly for this. The test updates are to ensure that a given GlobalValue is still linked in. This fixes pr21494. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Linker/testlink.ll')
-rw-r--r--test/Linker/testlink.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Linker/testlink.ll b/test/Linker/testlink.ll
index fea05682fdd..aad4b9bfb07 100644
--- a/test/Linker/testlink.ll
+++ b/test/Linker/testlink.ll
@@ -39,15 +39,20 @@
; CHECK-DAG: @Intern1 = internal constant i32 42
@Intern1 = internal constant i32 42
+@UseIntern1 = global i32* @Intern1
+
; This should get renamed since there is a definition that is non-internal in
; the other module.
; CHECK-DAG: @Intern2{{[0-9]+}} = internal constant i32 792
@Intern2 = internal constant i32 792
+@UseIntern2 = global i32* @Intern2
; CHECK-DAG: @MyVarPtr = linkonce global { i32* } { i32* @MyVar }
@MyVarPtr = linkonce global { i32* } { i32* @MyVar }
+@UseMyVarPtr = global { i32* }* @MyVarPtr
+
; CHECK-DAG: @MyVar = global i32 4
@MyVar = external global i32