[Attributor][FIX] Don't crash on internalizing linkonce_odr hidden functions
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 18 Aug 2020 20:32:21 +0000 (15:32 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 8 Sep 2020 04:38:09 +0000 (23:38 -0500)
commit711bf7dcf9546fefe18d32a5772d48e7b5166f08
treebc679d8875ebb6ae72188ad6d4b81eebb69a2934
parent53e4ef7fc25903430436ce456909d97aaa0fd6b2
[Attributor][FIX] Don't crash on internalizing linkonce_odr hidden functions

The CloneFunctionInto has implicit requirements with regards to the
linkage and visibility of the function. We now update these after we did
the CloneFunctionInto on the copy with the same linkage and visibility
as the original.
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/internalize.ll