diff options
| author | Eugene Leviant <eleviant@accesssoftek.com> | 2018-02-21 15:13:48 +0000 |
|---|---|---|
| committer | Eugene Leviant <eleviant@accesssoftek.com> | 2018-02-21 15:13:48 +0000 |
| commit | c556974f720ddfc31793f312e4024c6045ce5140 (patch) | |
| tree | 29a5a3fe2c75171cb6bcfcd36fdda7da3eccc1b2 /llvm/test/Linker/struct-mapping.ll | |
| parent | 9c669e13c9ce0eb5a835e897699cfefc14e3ed4a (diff) | |
| download | bcm5719-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.ll | 12 |
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
|

