[CallGraphUpdater] Remove dead constants before replacing a function
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 23 Mar 2020 06:09:49 +0000 (01:09 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 9 Apr 2020 03:52:46 +0000 (22:52 -0500)
commitcb0ecc5c33bd56a3eed0fa30ac787accec45d637
treecda8ded6c833cc64d472780db55b12f09a1355c4
parent5877d6f5f46cb2a61b6887504508fdb4c60fb157
[CallGraphUpdater] Remove dead constants before replacing a function

Dead constants might be left when a function is replaced, we can
gracefully handle this case and avoid complexity for the users who would
see an assertion otherwise.
llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
llvm/unittests/Analysis/CGSCCPassManagerTest.cpp