diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-22 21:35:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-22 21:35:47 +0000 |
commit | 370d528a0521f38bef33e985b929609c74ee32ae (patch) | |
tree | 937d13aaba8e68fc4fac300853a98528df623d07 /clang/lib/Sema/SemaDecl.cpp | |
parent | d4febd1612c51519033e8971c017a095bd3efa6d (diff) | |
download | bcm5719-llvm-370d528a0521f38bef33e985b929609c74ee32ae.tar.gz bcm5719-llvm-370d528a0521f38bef33e985b929609c74ee32ae.zip |
Drop comdats from the dst module if they are not selected.
A really unfortunate design of llvm-link and related libraries is that
they operate one module at a time.
This means they can copy a GV to the destination module that should not
be there in the final result because a later bitcode file takes
precedence.
We already handled cases like a strong GV replacing a weak for example.
One case that is not currently handled is a comdat replacing another.
This doesn't happen in ELF, but with COFF largest selection kind it is
possible.
In "llvm-link a.ll b.ll" if the selected comdat was from a.ll,
everything will work and we will not copy the comdat from b.ll.
But if we run "llvm-link b.ll a.ll", we fail to delete the already
copied comdat from b.ll. This patch fixes that.
llvm-svn: 264103
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
0 files changed, 0 insertions, 0 deletions