Set the body of a new struct as soon as it is created.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 25 Nov 2014 15:33:40 +0000 (15:33 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 25 Nov 2014 15:33:40 +0000 (15:33 +0000)
commitb4e2bdb21b5a58893a9b9c517b88c34e233d1f12
treee31171697919f8633a7441fca8cea2da97dd2e95
parentccac3a02298a02bc359f9ea0ee03c9a8d54c68ab
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
lib/Linker/LinkModules.cpp
test/Linker/Inputs/type-unique-name.ll [new file with mode: 0644]
test/Linker/type-unique-name.ll [new file with mode: 0644]