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)
commit33102d2faa533a56a6b5094635c50df341707559
tree0fa46c1327869daab0088447246f0f68d443c338
parent0fa7dc6b369a98e785eb7737903b450c318b21c2
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239492 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/User.h
lib/IR/Instructions.cpp
lib/IR/User.cpp