[cfe-commits] r44338 - /cfe/trunk/AST/StmtPrinter.cpp

Bill Wendling isanbard at gmail.com
Mon Nov 26 17:16:19 PST 2007


Hi Ted,

This probably doesn't make a huge difference, but you could pass the  
various LLVM streams in by value. They are really just light-weight  
wrappers around the STD::stream.

-bw

Am Nov 26, 2007 um 2:50 PM schrieb Ted Kremenek <kremenek at apple.com>:

> Author: kremenek
> Date: Mon Nov 26 16:50:46 2007
> New Revision: 44338
>
> URL: http://llvm.org/viewvc/llvm-project?rev=44338&view=rev
> Log:
> Removed dependence on #including iostream.
>
> Modified:
>    cfe/trunk/AST/StmtPrinter.cpp
>
> Modified: cfe/trunk/AST/StmtPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtPrinter.cpp?rev=44338&r1=44337&r2=44338&view=diff
>
> === 
> === 
> === 
> =====================================================================
> --- cfe/trunk/AST/StmtPrinter.cpp (original)
> +++ cfe/trunk/AST/StmtPrinter.cpp Mon Nov 26 16:50:46 2007
> @@ -19,7 +19,7 @@
> #include "clang/AST/PrettyPrinter.h"
> #include "clang/Basic/IdentifierTable.h"
> #include "llvm/Support/Compiler.h"
> -#include <iostream>
> +#include "llvm/Support/Streams.h"
> #include <iomanip>
> using namespace clang;
>
> @@ -788,8 +788,7 @@
> // 
> === 
> --- 
> ------------------------------------------------------------------- 
> ===//
>
> void Stmt::dumpPretty() const {
> -  // FIXME: eliminate use of <iostream>
> -  printPretty(std::cerr);
> +  printPretty(*llvm::cerr.stream());
> }
>
> void Stmt::printPretty(std::ostream &OS, PrinterHelper* Helper)  
> const {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list