diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 63e803ba71c..4f21cc3c70f 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -272,7 +272,7 @@ Another common example is:

   // Loop over all of the phi nodes in a basic block
   BasicBlock::iterator BBI = BB->begin();
-  for (; PHINode *PN = dyn_cast<PHINode>(&*BBI); ++BBI)
+  for (; PHINode *PN = dyn_cast<PHINode>(BBI); ++BBI)
     cerr << *PN;
 

@@ -617,16 +617,6 @@ is semantically equivalent to

Instruction* pinst = i;
-Caveat emptor: The above syntax works only when you're not -working with dyn_cast. The template definition of dyn_cast isn't implemented to handle this yet, so you'll -still need the following in order for things to work properly: - -
-BasicBlock::iterator bbi = ...;
-BranchInst* b = dyn_cast<BranchInst>(&*bbi);
-
- 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. Chris Lattner -Last modified: Mon Feb 24 14:45:19 CST 2003 +Last modified: Wed Apr 23 11:21:57 CDT 2003