[llvm-commits] [llvm] r81189 - /llvm/trunk/docs/ProgrammersManual.html

Chris Lattner sabre at nondot.org
Mon Sep 7 22:15:50 PDT 2009


Author: lattner
Date: Tue Sep  8 00:15:50 2009
New Revision: 81189

URL: http://llvm.org/viewvc/llvm-project?rev=81189&view=rev
Log:
llvm::cerr is gone.

Modified:
    llvm/trunk/docs/ProgrammersManual.html

Modified: llvm/trunk/docs/ProgrammersManual.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.html?rev=81189&r1=81188&r2=81189&view=diff

==============================================================================
--- llvm/trunk/docs/ProgrammersManual.html (original)
+++ llvm/trunk/docs/ProgrammersManual.html Tue Sep  8 00:15:50 2009
@@ -1654,7 +1654,7 @@
 for (Function::iterator i = func->begin(), e = func->end(); i != e; ++i)
   // <i>Print out the name of the basic block if it has one, and then the</i>
   // <i>number of instructions that it contains</i>
-  llvm::cerr << "Basic block (name=" << i->getName() << ") has "
+  errs() << "Basic block (name=" << i->getName() << ") has "
              << i->size() << " instructions.\n";
 </pre>
 </div>
@@ -1687,14 +1687,14 @@
 for (BasicBlock::iterator i = blk->begin(), e = blk->end(); i != e; ++i)
    // <i>The next statement works since operator<<(ostream&,...)</i>
    // <i>is overloaded for Instruction&</i>
-   llvm::cerr << *i << "\n";
+   errs() << *i << "\n";
 </pre>
 </div>
 
 <p>However, this isn't really the best way to print out the contents of a
 <tt>BasicBlock</tt>!  Since the ostream operators are overloaded for virtually
 anything you'll care about, you could have just invoked the print routine on the
-basic block itself: <tt>llvm::cerr << *blk << "\n";</tt>.</p>
+basic block itself: <tt>errs() << *blk << "\n";</tt>.</p>
 
 </div>
 
@@ -1720,7 +1720,7 @@
 
 // <i>F is a pointer to a Function instance</i>
 for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
-  llvm::cerr << *I << "\n";
+  errs() << *I << "\n";
 </pre>
 </div>
 
@@ -1799,7 +1799,7 @@
 void printNextInstruction(Instruction* inst) {
   BasicBlock::iterator it(inst);
   ++it; // <i>After this line, it refers to the instruction after *inst</i>
-  if (it != inst->getParent()->end()) llvm::cerr << *it << "\n";
+  if (it != inst->getParent()->end()) errs() << *it << "\n";
 }
 </pre>
 </div>
@@ -1917,8 +1917,8 @@
 
 for (Value::use_iterator i = F->use_begin(), e = F->use_end(); i != e; ++i)
   if (Instruction *Inst = dyn_cast<Instruction>(*i)) {
-    llvm::cerr << "F is used in instruction:\n";
-    llvm::cerr << *Inst << "\n";
+    errs() << "F is used in instruction:\n";
+    errs() << *Inst << "\n";
   }
 </pre>
 </div>





More information about the llvm-commits mailing list