]> granicus.if.org Git - llvm/commit
[ThinLTO] Rename COMDATs for COFF when promoting/renaming COMDAT leader
authorTeresa Johnson <tejohnson@google.com>
Thu, 31 Jan 2019 16:00:15 +0000 (16:00 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 31 Jan 2019 16:00:15 +0000 (16:00 +0000)
commitb51e8c39aeac1383be51da05e25b1d17f11ae6ab
tree1d83d9e3c4d9ce38bb7c9b287c12ad5d18e7c11f
parent922a3b1b3254bf3310c467e880a5419c1e13c87f
[ThinLTO] Rename COMDATs for COFF when promoting/renaming COMDAT leader

Summary:
COFF requires that COMDAT name match that of the leader. When we promote
and rename an internal leader in ThinLTO due to an import, ensure we
subsequently rename the associated COMDAT. Similar to D31963 which did
this during ThinLTO module splitting.

Fixes PR40414.

Reviewers: pcc, inglorion

Subscribers: mehdi_amini, dexonsmith, dmajor, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352763 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/FunctionImportUtils.h
lib/Transforms/Utils/FunctionImportUtils.cpp
test/Transforms/FunctionImport/Inputs/comdat.ll [new file with mode: 0644]
test/Transforms/FunctionImport/comdat.ll [new file with mode: 0644]