Don't produce an empty llvm.compiler.used in LTO.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 24 Apr 2013 17:54:35 +0000 (17:54 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 24 Apr 2013 17:54:35 +0000 (17:54 +0000)
commitd4ee3920c928f51e4c4d70b4fae97f4d99be2583
tree518bd5cc195a72a28a0a343d795de2737c97f70d
parent268adf2a03cf352593b632c5249c83f4fc56956f
Don't produce an empty llvm.compiler.used in LTO.

LTO was always creating an empty llvm.compiler.used. With this patch we
now first check if there is anything to be added first.

Unfortunately, there is no good way to test libLTO in isolation as it needs gold
or ld64, but there are bots doing LTO builds that found this problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180202 91177308-0d34-0410-b5e6-96231b3b80d8
tools/lto/LTOCodeGenerator.cpp