[Function] Properly remove use when clearing personality
authorKeno Fischer <kfischer@college.harvard.edu>
Wed, 23 Dec 2015 18:27:23 +0000 (18:27 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Wed, 23 Dec 2015 18:27:23 +0000 (18:27 +0000)
commitfdf52d35570d49dc00730511e32218aecd828926
tree4ec440a9b351b3a649c6d4fd66118cd798612835
parentd7f93b3cb5f75520f61b11e72e3d0b77eb431da3
[Function] Properly remove use when clearing personality

Summary:
We need to actually remove the use of the personality function,
otherwise we can run into trouble if we want to e.g. delete
the personality function because ther's no way to get rid of
its uses. Do this by resetting to ConstantPointerNull value
that the operands are set to when first allocated.

Reviewers: vsk, dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15752

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256345 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Function.cpp
unittests/IR/UserTest.cpp