diff options
author | Joel Stanley <jstanley@cs.uiuc.edu> | 2002-09-29 17:31:54 +0000 |
---|---|---|
committer | Joel Stanley <jstanley@cs.uiuc.edu> | 2002-09-29 17:31:54 +0000 |
commit | fc2aac7f8fa844c442659d1c008aca9a3d207c43 (patch) | |
tree | fadca9cd5f936f65c5af193bbb70b09a0ac1899d /llvm/docs/ProgrammersManual.html | |
parent | be55f2dd2c24919c54aa8e4f3894673ae224840b (diff) | |
download | bcm5719-llvm-fc2aac7f8fa844c442659d1c008aca9a3d207c43.tar.gz bcm5719-llvm-fc2aac7f8fa844c442659d1c008aca9a3d207c43.zip |
Fixed errors in ReplaceInstWithValue/ReplaceInstWithInst examples.
llvm-svn: 3973
Diffstat (limited to 'llvm/docs/ProgrammersManual.html')
-rw-r--r-- | llvm/docs/ProgrammersManual.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/docs/ProgrammersManual.html b/llvm/docs/ProgrammersManual.html index 26208f5b000..b5d587be31f 100644 --- a/llvm/docs/ProgrammersManual.html +++ b/llvm/docs/ProgrammersManual.html @@ -882,7 +882,8 @@ integer with an null pointer to an integer.</p> <pre> AllocaInst* instToReplace = ...; -ReplaceInstWithValue(*instToReplace->getParent(), instToReplace, +BasicBlock::iterator ii(instToReplace); +ReplaceInstWithValue(instToReplace->getParent()->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->getParent(), instToReplace, +BasicBlock::iterator ii(instToReplace); +ReplaceInstWithInst(instToReplace->getParent()->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> |