Change how the linker handles the old llvm.global_ctors.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 7 Dec 2015 13:24:23 +0000 (13:24 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 7 Dec 2015 13:24:23 +0000 (13:24 +0000)
commit35ecd26675997eeb0954dfb0edffb4ce85cf20f1
treeb862d7610e4b32b7c4f0aca5786f5a0a018ee156
parentfbb911506eb0aeca8a269d0fa80ac279d932b44f
Change how the linker handles the old llvm.global_ctors.

Now instead of changing it to the new format and then linking, it just
handles the old format while copying it over.

The main differences are:

* There is no rauw in the source module.
* An old format input is always upgraded.

The first item helps with having a sane API that passes in a GV list to
the linker.

The second one is a small step in deprecating the old format.

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