Add User::growHungoffUses and use it to grow the hung off uses. NFC.
authorPete Cooper <peter_cooper@apple.com>
Wed, 10 Jun 2015 22:38:41 +0000 (22:38 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 10 Jun 2015 22:38:41 +0000 (22:38 +0000)
commit93f9ff5781978963f2252ec36d402a1ef23a0500
treee1b7772496c018cfd705ee657bbb7cd48fd8099d
parent178dcc29382d8bbe96467d4fca03d16c858496d3
Add User::growHungoffUses and use it to grow the hung off uses. NFC.

PhiNode, SwitchInst, LandingPad and IndirectBr all had virtually identical
logic for growing the hung off uses.
Move it to User so that they can all call a single shared implementation.

Their destructors were all empty after this change and were deleted.  They all
have virtual clone_impl methods which can be used as vtable anchors.

Reviewed by Duncan Exon Smith.

llvm-svn: 239492
llvm/include/llvm/IR/User.h
llvm/lib/IR/Instructions.cpp
llvm/lib/IR/User.cpp