Add extra method to PHI node class
authorChris Lattner <sabre@nondot.org>
Thu, 7 Jun 2001 16:59:37 +0000 (16:59 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 7 Jun 2001 16:59:37 +0000 (16:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/InstrTypes.cpp

index 29b293f1aa29b190c5ee72f3b8fa0457208b0e23..decb4ad386412ef4981b4d943f737f65ba790fad 100644 (file)
@@ -64,3 +64,10 @@ void PHINode::addIncoming(Value *D) {
   IncomingValues.push_back(Use(D, this));
 }
 
+// removeIncomingValue - Remove an incoming value.  This is useful if a
+// predecessor basic block is deleted.
+Value *PHINode::removeIncomingValue(unsigned idx) {
+  Value *Removed = IncomingValues[idx];
+  IncomingValues.erase(IncomingValues.begin()+idx);
+  return Removed;
+}