summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/alias.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Linker/alias.ll')
-rw-r--r--llvm/test/Linker/alias.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Linker/alias.ll b/llvm/test/Linker/alias.ll
new file mode 100644
index 00000000000..5809a150820
--- /dev/null
+++ b/llvm/test/Linker/alias.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-link %s %S/Inputs/alias.ll -S -o - | FileCheck %s
+; RUN: llvm-link %S/Inputs/alias.ll %s -S -o - | FileCheck %s
+
+@foo = weak global i32 0
+; CHECK-DAG: @foo = alias i32* @zed
+
+@bar = alias i32* @foo
+; CHECK-DAG: @bar = alias i32* @zed
+
+@foo2 = weak global i32 0
+; CHECK-DAG: @foo2 = alias i16, i32* @zed
+
+@bar2 = alias i32* @foo2
+; CHECK-DAG: @bar2 = alias i32* @zed
+
+; CHECK-DAG: @zed = global i32 42
OpenPOWER on IntegriCloud