From: Joel Stanley
AllocaInst* instToReplace = ...;
-ReplaceInstWithValue(*instToReplace->getParent(), instToReplace,
+BasicBlock::iterator ii(instToReplace);
+ReplaceInstWithValue(instToReplace->getParent()->getInstList(), ii,
Constant::getNullValue(PointerType::get(Type::IntTy)));
@@ -894,7 +895,8 @@ instruction. The following example illustrates the replacement of one
AllocaInst* instToReplace = ...;
-ReplaceInstWithInst(*instToReplace->getParent(), instToReplace,
+BasicBlock::iterator ii(instToReplace);
+ReplaceInstWithInst(instToReplace->getParent()->getInstList(), ii,
new AllocaInst(Type::IntTy, 0, "ptrToReplacedInt");
@@ -1758,6 +1760,6 @@ pointer to the parent Function.
Chris Lattner
-Last modified: Sun Sep 22 14:38:05 CDT 2002
+Last modified: Sun Sep 29 12:31:23 CDT 2002