From 4b28793c85d264f5f6285e4e7367df34a1c7057f Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Sun, 29 Sep 2002 17:31:54 +0000 Subject: [PATCH] Fixed errors in ReplaceInstWithValue/ReplaceInstWithInst examples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3973 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ProgrammersManual.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 26208f5b000..b5d587be31f 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -882,7 +882,8 @@ integer with an null pointer to an integer.

 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 -- 2.34.1