summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/struct-mapping.ll
diff options
context:
space:
mode:
authorEugene Leviant <eleviant@accesssoftek.com>2018-02-21 15:13:48 +0000
committerEugene Leviant <eleviant@accesssoftek.com>2018-02-21 15:13:48 +0000
commitc556974f720ddfc31793f312e4024c6045ce5140 (patch)
tree29a5a3fe2c75171cb6bcfcd36fdda7da3eccc1b2 /llvm/test/Linker/struct-mapping.ll
parent9c669e13c9ce0eb5a835e897699cfefc14e3ed4a (diff)
downloadbcm5719-llvm-c556974f720ddfc31793f312e4024c6045ce5140.tar.gz
bcm5719-llvm-c556974f720ddfc31793f312e4024c6045ce5140.zip
[IRMover] Implement name based structure type mapping
Differential revision: https://reviews.llvm.org/D43199 llvm-svn: 325686
Diffstat (limited to 'llvm/test/Linker/struct-mapping.ll')
-rw-r--r--llvm/test/Linker/struct-mapping.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Linker/struct-mapping.ll b/llvm/test/Linker/struct-mapping.ll
new file mode 100644
index 00000000000..732ef8c50cd
--- /dev/null
+++ b/llvm/test/Linker/struct-mapping.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-link --initial-module=%s %p/Inputs/struct-mapping.ll -S -o - | FileCheck %s
+
+; Here we check that new type mapping algorithm correctly mapped type of internal
+; member of struct.Baz to struct.Foo. Without it we'd map that type to struct.Bar, because
+; it is recursively isomorphic to struct.Foo and is defined first in source file.
+; CHECK: %struct.Baz = type { i64, i64, %struct.Foo }
+
+%struct.Bar = type { i64, i64 }
+%struct.Foo = type { i64, i64 }
+
+@bar = global %struct.Bar zeroinitializer
+@foo = global %struct.Foo zeroinitializer
OpenPOWER on IntegriCloud