]> granicus.if.org Git - llvm/commit
ThinLTOBitcodeWriter: keep comdats together, rename if leader is renamed
authorBob Haarman <llvm@inglorion.net>
Wed, 12 Apr 2017 01:43:07 +0000 (01:43 +0000)
committerBob Haarman <llvm@inglorion.net>
Wed, 12 Apr 2017 01:43:07 +0000 (01:43 +0000)
commit4a0d76ba2f311e42afc5d72d7b4966ad9ee38e41
treed1e143a983869b52d3d2e27a3365afea6a4092c7
parente9dc13a1838b954a69a7ab7c7f76ed12c3718c02
ThinLTOBitcodeWriter: keep comdats together, rename if leader is renamed

Summary:
COFF requires that every comdat contain a symbol with the same name as
the comdat. ThinLTOBitcodeWriter renames symbols, which may cause this
requirement to be violated. This change avoids such violations by
renaming comdats if their leaders are renamed. It also keeps comdats
together when splitting modules.

Reviewers: pcc, mehdi_amini, tejohnson

Reviewed By: pcc

Subscribers: rnk, Prazek, llvm-commits

Differential Revision: https://reviews.llvm.org/D31963

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300019 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
test/Transforms/ThinLTOBitcodeWriter/comdat.ll [new file with mode: 0644]