Remove unused GlobalVariable::replaceUsesOfWithOnConstant. NFC.

The only caller of this method is Value::replaceAllUsesWith which
explicitly checks that we are not a GlobalValue.  So replace the
body with an unreachable to ensure that we never call it.

The unreachable itself is moved to GlobalValue not GlobalVariable
as that is the base class of all the globals we don't want to call
this method on.

Note, this patch is short lived as i'll soon refactor all callers
of this method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2015-06-24 00:05:07 +00:00
parent cd5ba15e76
commit eab3c6548c
3 changed files with 5 additions and 24 deletions

View File

@@ -166,10 +166,6 @@ public:
///
void eraseFromParent() override;
/// Override Constant's implementation of this method so we can
/// replace constant initializers.
void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) override;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
return V->getValueID() == Value::GlobalVariableVal;