[llvm] r222985 - Add a test showing what the linker IdentifiedStructTypes is for.
Rafael Espindola
rafael.espindola at gmail.com
Sun Nov 30 19:20:58 PST 2014
Author: rafael
Date: Sun Nov 30 21:20:57 2014
New Revision: 222985
URL: http://llvm.org/viewvc/llvm-project?rev=222985&view=rev
Log:
Add a test showing what the linker IdentifiedStructTypes is for.
Without this it could just be deleted and all tests would pass.
Added:
llvm/trunk/test/Linker/Inputs/type-unique-dst-types2.ll
llvm/trunk/test/Linker/Inputs/type-unique-dst-types3.ll
llvm/trunk/test/Linker/type-unique-dst-types.ll
Added: llvm/trunk/test/Linker/Inputs/type-unique-dst-types2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-dst-types2.ll?rev=222985&view=auto
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-dst-types2.ll (added)
+++ llvm/trunk/test/Linker/Inputs/type-unique-dst-types2.ll Sun Nov 30 21:20:57 2014
@@ -0,0 +1,3 @@
+%A.11 = type { %B }
+%B = type { i8 }
+ at g1 = external global %A.11
Added: llvm/trunk/test/Linker/Inputs/type-unique-dst-types3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-dst-types3.ll?rev=222985&view=auto
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-dst-types3.ll (added)
+++ llvm/trunk/test/Linker/Inputs/type-unique-dst-types3.ll Sun Nov 30 21:20:57 2014
@@ -0,0 +1,2 @@
+%A.11 = type opaque
+ at g2 = external global %A.11
Added: llvm/trunk/test/Linker/type-unique-dst-types.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-dst-types.ll?rev=222985&view=auto
==============================================================================
--- llvm/trunk/test/Linker/type-unique-dst-types.ll (added)
+++ llvm/trunk/test/Linker/type-unique-dst-types.ll Sun Nov 30 21:20:57 2014
@@ -0,0 +1,16 @@
+; RUN: llvm-link %p/type-unique-dst-types.ll \
+; RUN: %p/Inputs/type-unique-dst-types2.ll \
+; RUN: %p/Inputs/type-unique-dst-types3.ll -S -o - | FileCheck %s
+
+; This tests the importance of keeping track of which types are part of the
+; destination module.
+; When the second input is merged in, the context gets an unused A.11. When
+; the third module is then merged, we should pretend it doesn't exist.
+
+; CHECK: %A = type { %B }
+; CHECK-NEXT: %B = type { i8 }
+; CHECK-NEXT: %A.11.1 = type opaque
+
+%A = type { %B }
+%B = type { i8 }
+ at g3 = external global %A
More information about the llvm-commits
mailing list