summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Linker/Inputs/type-unique-alias.ll4
-rw-r--r--llvm/test/Linker/type-unique-alias.ll10
2 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Linker/Inputs/type-unique-alias.ll b/llvm/test/Linker/Inputs/type-unique-alias.ll
new file mode 100644
index 00000000000..3ee162ccfcf
--- /dev/null
+++ b/llvm/test/Linker/Inputs/type-unique-alias.ll
@@ -0,0 +1,4 @@
+%u = type { i8 }
+
+@g2 = global %u zeroinitializer
+@a = weak alias %u* @g2
diff --git a/llvm/test/Linker/type-unique-alias.ll b/llvm/test/Linker/type-unique-alias.ll
new file mode 100644
index 00000000000..e43450fbbeb
--- /dev/null
+++ b/llvm/test/Linker/type-unique-alias.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-link -S %s %p/Inputs/type-unique-alias.ll | FileCheck %s
+
+%t = type { i8 }
+
+@g = global %t zeroinitializer
+@a = weak alias %t* @g
+
+; CHECK: @g = global %t zeroinitializer
+; CHECK: @g2 = global %t zeroinitializer
+; CHECK: @a = weak alias %t* @g
OpenPOWER on IntegriCloud