Allow for "unsafe" replaceAllUsesWith operatations, for use during type resolution
authorChris Lattner <sabre@nondot.org>
Fri, 29 Aug 2003 05:36:05 +0000 (05:36 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 29 Aug 2003 05:36:05 +0000 (05:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8208 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Constant.h
include/llvm/Constants.h

index a7ec6331bd5c658fc7a910f94b0cba01571c1d26..e6f63b12921b9d6438f91bad7032711ae7dad1e6 100644 (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.
index 04e4397531240cfa86547540645e466524ab10e8..f36e28bd44bd93f3c44324fba661b8f42d52896e 100644 (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) {