Use new replaceAllUsesWith stuff in a way that works even though types have not yet been propagated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8210
91177308-0d34-0410-b5e6-
96231b3b80d8
// Must handle Constants specially, we cannot call replaceUsesOfWith on a
// constant!
if (Constant *C = dyn_cast<Constant>(Use)) {
- C->replaceUsesOfWithOnConstant(this, New);
+ C->replaceUsesOfWithOnConstant(this, New, true);
} else {
Use->replaceUsesOfWith(this, New);
}