diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 5932aaf727f..716d364ed56 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -1484,8 +1484,8 @@ small example that shows how to dump all instructions in a function to the stand #include "llvm/Support/InstIterator.h" // F is a pointer to a Function instance -for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) - llvm::cerr << *i << "\n"; +for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) + llvm::cerr << *I << "\n"; @@ -1497,7 +1497,10 @@ F, all you would need to do is something like:
std::set<Instruction*> worklist; -worklist.insert(inst_begin(F), inst_end(F)); +// or better yet, SmallPtrSet<Instruction*, 64> worklist; + +for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) + worklist.insert(&*I);