[llvm-commits] CVS: llvm/www/docs/ProgrammersManual.html
Chris Lattner
lattner at cs.uiuc.edu
Wed Apr 23 11:27:01 PDT 2003
Changes in directory llvm/www/docs:
ProgrammersManual.html updated: 1.38 -> 1.39
---
Log message:
Remove documented problem that is now fixed
---
Diffs of the changes:
Index: llvm/www/docs/ProgrammersManual.html
diff -u llvm/www/docs/ProgrammersManual.html:1.38 llvm/www/docs/ProgrammersManual.html:1.39
--- llvm/www/docs/ProgrammersManual.html:1.38 Wed Feb 26 10:38:15 2003
+++ llvm/www/docs/ProgrammersManual.html Wed Apr 23 11:26:15 2003
@@ -272,7 +272,7 @@
<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 @@
<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 @@
<a href="mailto:sabre at 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>
More information about the llvm-commits
mailing list