llvm-6502/test/Linker/type-unique-name.ll
Rafael Espindola b4e2bdb21b Set the body of a new struct as soon as it is created.
This changes the order in which different types are passed to get, but
one order is not inherently better than the other.

The main motivation is that this simplifies linkDefinedTypeBodies now that
it is only linking "real" opaque types. It is also means that we only have to
call it once and that we don't need getImpl.

A small change in behavior is that we don't copy type names when resolving
opaque types. This is an improvement IMHO, but it can be added back if
desired. A test is included with the new behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222764 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25 15:33:40 +00:00

14 lines
232 B
LLVM

; RUN: llvm-link -S %s %p/Inputs/type-unique-name.ll | FileCheck %s
; Test that we keep the type name
; CHECK: %abc = type { i8 }
%abc = type opaque
declare %abc* @f()
define %abc* @g() {
%x = call %abc* @f()
ret %abc* %x
}