summaryrefslogtreecommitdiff
path: root/docs/ProgrammersManual.html
diff options
context:
space:
mode:
authorJoel Stanley <jstanley@cs.uiuc.edu>2002-09-29 17:31:54 +0000
committerJoel Stanley <jstanley@cs.uiuc.edu>2002-09-29 17:31:54 +0000
commit4b28793c85d264f5f6285e4e7367df34a1c7057f (patch)
treeb9d484214821dbf0e37c8814de0d974c747942d2 /docs/ProgrammersManual.html
parent41174595670a6d51671f174f44e376ada78d1841 (diff)
downloadllvm-4b28793c85d264f5f6285e4e7367df34a1c7057f.tar.gz
llvm-4b28793c85d264f5f6285e4e7367df34a1c7057f.tar.bz2
llvm-4b28793c85d264f5f6285e4e7367df34a1c7057f.tar.xz
Fixed errors in ReplaceInstWithValue/ReplaceInstWithInst examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ProgrammersManual.html')
-rw-r--r--docs/ProgrammersManual.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index 26208f5b00..b5d587be31 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -882,7 +882,8 @@ integer with an null pointer to an integer.</p>
<pre>
AllocaInst* instToReplace = ...;
-ReplaceInstWithValue(*instToReplace-&gt;getParent(), instToReplace,
+BasicBlock::iterator ii(instToReplace);
+ReplaceInstWithValue(instToReplace-&gt;getParent()-&gt;getInstList(), ii,
Constant::getNullValue(PointerType::get(Type::IntTy)));
</pre>
@@ -894,7 +895,8 @@ instruction. The following example illustrates the replacement of one
<pre>
AllocaInst* instToReplace = ...;
-ReplaceInstWithInst(*instToReplace-&gt;getParent(), instToReplace,
+BasicBlock::iterator ii(instToReplace);
+ReplaceInstWithInst(instToReplace-&gt;getParent()-&gt;getInstList(), ii,
new AllocaInst(Type::IntTy, 0, "ptrToReplacedInt");
</pre>
@@ -1758,6 +1760,6 @@ pointer to the parent Function.
<a href="mailto:sabre@nondot.org">Chris Lattner</a></address>
<!-- Created: Tue Aug 6 15:00:33 CDT 2002 -->
<!-- hhmts start -->
-Last modified: Sun Sep 22 14:38:05 CDT 2002
+Last modified: Sun Sep 29 12:31:23 CDT 2002
<!-- hhmts end -->
</font></body></html>