llvm.org GIT mirror llvm / 6ac02a9
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 Chris Lattner 17 years ago
2 changed file(s) with 10 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
6666 /// use Value::replaceAllUsesWith, which automatically dispatches to this
6767 /// method as needed.
6868 ///
69 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To) {
69 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
70 bool DisableChecking = false) {
7071 // Provide a default implementation for constants (like integers) that
7172 // cannot use any other values. This cannot be called at runtime, but needs
7273 // to be here to avoid link errors.
314314 }
315315
316316 virtual void destroyConstant();
317 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
317 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
318 bool DisableChecking = false);
318319
319320 /// Methods for support type inquiry through isa, cast, and dyn_cast:
320321 static inline bool classof(const ConstantArray *) { return true; }
361362 }
362363
363364 virtual void destroyConstant();
364 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
365 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
366 bool DisableChecking = false);
365367
366368 /// Methods for support type inquiry through isa, cast, and dyn_cast:
367369 static inline bool classof(const ConstantStruct *) { return true; }
455457 }
456458
457459 virtual void destroyConstant();
458 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
460 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
461 bool DisableChecking = false);
459462
460463 /// Methods for support type inquiry through isa, cast, and dyn_cast:
461464 static inline bool classof(const ConstantPointerRef *) { return true; }
525528 virtual bool isConstantExpr() const { return true; }
526529
527530 virtual void destroyConstant();
528 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
531 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To,
532 bool DisableChecking = false);
529533
530534 /// Override methods to provide more type information...
531535 inline Constant *getOperand(unsigned i) {