From 9a01f15e24268ce770a36d1890b749b84af56391 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 23 Apr 2003 16:26:15 +0000 Subject: Remove documented problem that is now fixed llvm-svn: 5869 --- llvm/docs/ProgrammersManual.html | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'llvm/docs/ProgrammersManual.html') diff --git a/llvm/docs/ProgrammersManual.html b/llvm/docs/ProgrammersManual.html index 63e803ba71c..4f21cc3c70f 100644 --- a/llvm/docs/ProgrammersManual.html +++ b/llvm/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 -- cgit v1.2.3