OSDN Git Service

ThinLTO: Remove check for multiple modules before applying weak resolutions.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 7 Jul 2016 01:51:11 +0000 (01:51 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 7 Jul 2016 01:51:11 +0000 (01:51 +0000)
commitb821e278a9745727b9d6c8f356153fc5fb6a4ba9
treed3f056937908fc3ae0cb301960176595d429cfab
parent2b24567ec3e867eb7571bc873b1e484997a21e0c
ThinLTO: Remove check for multiple modules before applying weak resolutions.

This check is not only unnecessary, it can produce the wrong result. If we
are linking a single module and it has an exported linkonce symbol, we need
to promote to weak in order to avoid PR19901-style problems.

Differential Revision: http://reviews.llvm.org/D21917

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274722 91177308-0d34-0410-b5e6-96231b3b80d8
lib/LTO/LTO.cpp
test/ThinLTO/X86/weak_resolution_single.ll [new file with mode: 0644]