[SimplifyCFG] Don't kill empty cleanuppads with multiple uses
A basic block could contain:
%cp = cleanuppad []
cleanupret from %cp unwind to caller
This basic block is empty and is thus a candidate for removal. However,
there can be other uses of %cp outside of this basic block. This is
only possible in unreachable blocks.
Make our transform more correct by checking that the pad has a single
user before removing the BB.
This fixes PR28005.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271816
91177308-0d34-0410-b5e6-
96231b3b80d8