mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Fixed errors in ReplaceInstWithValue/ReplaceInstWithInst examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4117459567
commit
4b28793c85
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user