diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-23 16:26:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-23 16:26:15 +0000 |
commit | 6a5471038d5d7d001b12cdfba91a291696b330ca (patch) | |
tree | f7da381ebffbf471e79a0cc0baf5a96a9d2fe560 /docs/ProgrammersManual.html | |
parent | f7235cde69c7017aecbc6609ee3db2fc81ad2668 (diff) |
Remove documented problem that is now fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ProgrammersManual.html')
-rw-r--r-- | docs/ProgrammersManual.html | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 63e803ba71..4f21cc3c70 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -272,7 +272,7 @@ Another common example is:<p> <pre> <i>// Loop over all of the phi nodes in a basic block</i> BasicBlock::iterator BBI = BB->begin(); - for (; <a href="#PhiNode">PHINode</a> *PN = dyn_cast<<a href="#PHINode">PHINode</a>>(&*BBI); ++BBI) + for (; <a href="#PhiNode">PHINode</a> *PN = dyn_cast<<a href="#PHINode">PHINode</a>>(BBI); ++BBI) cerr << *PN; </pre><p> @@ -617,16 +617,6 @@ is semantically equivalent to <pre>Instruction* pinst = i;</pre> -<b>Caveat emptor</b>: The above syntax works <i>only</i> when you're <i>not</i> -working with <tt>dyn_cast</tt>. The template definition of <tt><a -href="#isa">dyn_cast</a></tt> isn't implemented to handle this yet, so you'll -still need the following in order for things to work properly: - -<pre> -BasicBlock::iterator bbi = ...; -<a href="#BranchInst">BranchInst</a>* b = <a href="#isa">dyn_cast</a><<a href="#BranchInst">BranchInst</a>>(&*bbi); -</pre> - It's also possible to turn a class pointer into the corresponding iterator. Usually, this conversion is quite inexpensive. The following code snippet illustrates use of the conversion constructors @@ -1745,6 +1735,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: Mon Feb 24 14:45:19 CST 2003 +Last modified: Wed Apr 23 11:21:57 CDT 2003 <!-- hhmts end --> </font></body></html> |