Allow for "unsafe" replaceAllUsesWith operatations, for use during type resolution

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-29 05:36:05 +00:00
parent 205f9fce19
commit 6ac02a9092
2 changed files with 10 additions and 5 deletions

View File

@ -67,7 +67,8 @@ public:
/// use Value::replaceAllUsesWith, which automatically dispatches to this
/// method as needed.
///
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To) {
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
bool DisableChecking = false) {
// Provide a default implementation for constants (like integers) that
// cannot use any other values. This cannot be called at runtime, but needs
// to be here to avoid link errors.

View File

@ -315,7 +315,8 @@ public:
}
virtual void destroyConstant();
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
bool DisableChecking = false);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const ConstantArray *) { return true; }
@ -362,7 +363,8 @@ public:
}
virtual void destroyConstant();
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
bool DisableChecking = false);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const ConstantStruct *) { return true; }
@ -456,7 +458,8 @@ public:
}
virtual void destroyConstant();
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
bool DisableChecking = false);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const ConstantPointerRef *) { return true; }
@ -526,7 +529,8 @@ public:
virtual bool isConstantExpr() const { return true; }
virtual void destroyConstant();
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
bool DisableChecking = false);
/// Override methods to provide more type information...
inline Constant *getOperand(unsigned i) {