Fix pr20078.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 5 Sep 2014 21:27:52 +0000 (21:27 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 5 Sep 2014 21:27:52 +0000 (21:27 +0000)
commite8b19acded1d944918a35c6196d8336916dde735
treeec2c29d4d3eb83b51f0ee7ac2a1899ef867ad3ab
parentea388503c47ba1af00b0ab2d4f5d8ae2fcbef727
Fix pr20078.

When linking llvm.global_ctors with the optional third element we have to handle
it specially and only copy the elements whose keys were also copied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217281 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
test/Linker/Inputs/ctors.ll [new file with mode: 0644]
test/Linker/ctors.ll [new file with mode: 0644]