[cfe-commits] r79854 - in /cfe/trunk/lib: AST/DeclPrinter.cpp AST/StmtPrinter.cpp Analysis/AnalysisManager.cpp Analysis/BasicStore.cpp Analysis/CFG.cpp Analysis/Environment.cpp Analysis/GRExprEngine.cpp Analysis/SVals.cpp Basic/FileManager.cpp Basic/SourceManager.cpp Frontend/ASTConsumers.cpp Frontend/AnalysisConsumer.cpp Frontend/CacheTokens.cpp Frontend/FixItRewriter.cpp Frontend/GeneratePCH.cpp Frontend/HTMLDiagnostics.cpp Frontend/RewriteMacros.cpp Frontend/RewriteObjC.cpp Lex/PTHLexer.cpp Lex/Preprocessor.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Aug 23 05:08:50 PDT 2009
Author: d0k
Date: Sun Aug 23 07:08:50 2009
New Revision: 79854
URL: http://llvm.org/viewvc/llvm-project?rev=79854&view=rev
Log:
Replace cerr with errs().
Modified:
cfe/trunk/lib/AST/DeclPrinter.cpp
cfe/trunk/lib/AST/StmtPrinter.cpp
cfe/trunk/lib/Analysis/AnalysisManager.cpp
cfe/trunk/lib/Analysis/BasicStore.cpp
cfe/trunk/lib/Analysis/CFG.cpp
cfe/trunk/lib/Analysis/Environment.cpp
cfe/trunk/lib/Analysis/GRExprEngine.cpp
cfe/trunk/lib/Analysis/SVals.cpp
cfe/trunk/lib/Basic/FileManager.cpp
cfe/trunk/lib/Basic/SourceManager.cpp
cfe/trunk/lib/Frontend/ASTConsumers.cpp
cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
cfe/trunk/lib/Frontend/CacheTokens.cpp
cfe/trunk/lib/Frontend/FixItRewriter.cpp
cfe/trunk/lib/Frontend/GeneratePCH.cpp
cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp
cfe/trunk/lib/Frontend/RewriteMacros.cpp
cfe/trunk/lib/Frontend/RewriteObjC.cpp
cfe/trunk/lib/Lex/PTHLexer.cpp
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Sun Aug 23 07:08:50 2009
@@ -19,7 +19,6 @@
#include "clang/AST/Expr.h"
#include "clang/AST/PrettyPrinter.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Sun Aug 23 07:08:50 2009
@@ -17,7 +17,6 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/PrettyPrinter.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/Format.h"
using namespace clang;
Modified: cfe/trunk/lib/Analysis/AnalysisManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/AnalysisManager.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/AnalysisManager.cpp (original)
+++ cfe/trunk/lib/Analysis/AnalysisManager.cpp Sun Aug 23 07:08:50 2009
@@ -13,7 +13,6 @@
#include "clang/Analysis/PathSensitive/AnalysisManager.h"
#include "clang/Basic/SourceManager.h"
-#include "llvm/Support/Streams.h"
using namespace clang;
@@ -29,8 +28,8 @@
isa<ObjCMethodDecl>(getCodeDecl())) {
const NamedDecl *ND = cast<NamedDecl>(getCodeDecl());
SourceManager &SM = getContext().getSourceManager();
- llvm::cerr << "ANALYZE: "
- << SM.getPresumedLoc(ND->getLocation()).getFilename()
- << ' ' << ND->getNameAsString() << '\n';
+ llvm::errs() << "ANALYZE: "
+ << SM.getPresumedLoc(ND->getLocation()).getFilename()
+ << ' ' << ND->getNameAsString() << '\n';
}
}
Modified: cfe/trunk/lib/Analysis/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicStore.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicStore.cpp Sun Aug 23 07:08:50 2009
@@ -15,9 +15,8 @@
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/PathSensitive/AnalysisContext.h"
#include "clang/Analysis/PathSensitive/GRState.h"
-#include "llvm/ADT/ImmutableMap.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/ADT/ImmutableMap.h"
using namespace clang;
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Sun Aug 23 07:08:50 2009
@@ -16,13 +16,12 @@
#include "clang/Analysis/CFG.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/PrettyPrinter.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/GraphWriter.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/Compiler.h"
-#include <llvm/Support/Allocator.h>
-#include <llvm/Support/Format.h>
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/Format.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallPtrSet.h"
using namespace clang;
Modified: cfe/trunk/lib/Analysis/Environment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Environment.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/Environment.cpp (original)
+++ cfe/trunk/lib/Analysis/Environment.cpp Sun Aug 23 07:08:50 2009
@@ -12,9 +12,8 @@
//===----------------------------------------------------------------------===//
#include "clang/Analysis/PathSensitive/GRState.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
-#include "llvm/ADT/ImmutableMap.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/ADT/ImmutableMap.h"
using namespace clang;
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Sun Aug 23 07:08:50 2009
@@ -22,10 +22,9 @@
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/PrettyStackTrace.h"
-#include "llvm/Support/Streams.h"
-#include "llvm/ADT/ImmutableList.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/ImmutableList.h"
#ifndef NDEBUG
#include "llvm/Support/GraphWriter.h"
@@ -3292,7 +3291,7 @@
std::auto_ptr<ExplodedGraph> TrimmedG(G.Trim(Beg, End).first);
if (!TrimmedG.get())
- llvm::cerr << "warning: Trimmed ExplodedGraph is empty.\n";
+ llvm::errs() << "warning: Trimmed ExplodedGraph is empty.\n";
else
llvm::ViewGraph(*TrimmedG->roots_begin(), "TrimmedGRExprEngine");
Modified: cfe/trunk/lib/Analysis/SVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/SVals.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/SVals.cpp (original)
+++ cfe/trunk/lib/Analysis/SVals.cpp Sun Aug 23 07:08:50 2009
@@ -14,7 +14,6 @@
#include "clang/Analysis/PathSensitive/GRState.h"
#include "clang/Basic/IdentifierTable.h"
-#include "llvm/Support/Streams.h"
using namespace clang;
using llvm::dyn_cast;
Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Sun Aug 23 07:08:50 2009
@@ -20,7 +20,6 @@
#include "clang/Basic/FileManager.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/System/Path.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Config/config.h"
using namespace clang;
@@ -247,14 +246,14 @@
// Nope, there isn't. Check to see if the file exists.
struct stat StatBuf;
- //llvm::cerr << "STATING: " << Filename;
+ //llvm::errs() << "STATING: " << Filename;
if (stat_cached(InterndFileName, &StatBuf) || // Error stat'ing.
S_ISDIR(StatBuf.st_mode)) { // A directory?
// If this file doesn't exist, we leave a null in FileEntries for this path.
- //llvm::cerr << ": Not existing\n";
+ //llvm::errs() << ": Not existing\n";
return 0;
}
- //llvm::cerr << ": exists\n";
+ //llvm::errs() << ": exists\n";
// It exists. See if we have already opened a file with the same inode.
// This occurs when one dir is symlinked to another, for example.
@@ -276,15 +275,15 @@
}
void FileManager::PrintStats() const {
- llvm::cerr << "\n*** File Manager Stats:\n";
- llvm::cerr << UniqueFiles.size() << " files found, "
- << UniqueDirs.size() << " dirs found.\n";
- llvm::cerr << NumDirLookups << " dir lookups, "
- << NumDirCacheMisses << " dir cache misses.\n";
- llvm::cerr << NumFileLookups << " file lookups, "
- << NumFileCacheMisses << " file cache misses.\n";
+ llvm::errs() << "\n*** File Manager Stats:\n";
+ llvm::errs() << UniqueFiles.size() << " files found, "
+ << UniqueDirs.size() << " dirs found.\n";
+ llvm::errs() << NumDirLookups << " dir lookups, "
+ << NumDirCacheMisses << " dir cache misses.\n";
+ llvm::errs() << NumFileLookups << " file lookups, "
+ << NumFileCacheMisses << " file cache misses.\n";
- //llvm::cerr << PagesMapped << BytesOfPagesMapped << FSLookups;
+ //llvm::errs() << PagesMapped << BytesOfPagesMapped << FSLookups;
}
int MemorizeStatCalls::stat(const char *path, struct stat *buf) {
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Sun Aug 23 07:08:50 2009
@@ -17,9 +17,7 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/System/Path.h"
-#include "llvm/Support/Streams.h"
#include <algorithm>
-#include <iostream>
using namespace clang;
using namespace SrcMgr;
using llvm::MemoryBuffer;
@@ -1062,11 +1060,11 @@
/// PrintStats - Print statistics to stderr.
///
void SourceManager::PrintStats() const {
- llvm::cerr << "\n*** Source Manager Stats:\n";
- llvm::cerr << FileInfos.size() << " files mapped, " << MemBufferInfos.size()
- << " mem buffers mapped.\n";
- llvm::cerr << SLocEntryTable.size() << " SLocEntry's allocated, "
- << NextOffset << "B of Sloc address space used.\n";
+ llvm::errs() << "\n*** Source Manager Stats:\n";
+ llvm::errs() << FileInfos.size() << " files mapped, " << MemBufferInfos.size()
+ << " mem buffers mapped.\n";
+ llvm::errs() << SLocEntryTable.size() << " SLocEntry's allocated, "
+ << NextOffset << "B of Sloc address space used.\n";
unsigned NumLineNumsComputed = 0;
unsigned NumFileBytesMapped = 0;
@@ -1075,10 +1073,10 @@
NumFileBytesMapped += I->second->getSizeBytesMapped();
}
- llvm::cerr << NumFileBytesMapped << " bytes of files mapped, "
- << NumLineNumsComputed << " files with line #'s computed.\n";
- llvm::cerr << "FileID scans: " << NumLinearScans << " linear, "
- << NumBinaryProbes << " binary.\n";
+ llvm::errs() << NumFileBytesMapped << " bytes of files mapped, "
+ << NumLineNumsComputed << " files with line #'s computed.\n";
+ llvm::errs() << "FileID scans: " << NumLinearScans << " linear, "
+ << NumBinaryProbes << " binary.\n";
}
ExternalSLocEntrySource::~ExternalSLocEntrySource() { }
Modified: cfe/trunk/lib/Frontend/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTConsumers.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTConsumers.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTConsumers.cpp Sun Aug 23 07:08:50 2009
@@ -23,7 +23,6 @@
#include "clang/AST/PrettyPrinter.h"
#include "clang/CodeGen/ModuleBuilder.h"
#include "llvm/Module.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
@@ -117,9 +116,9 @@
FD->print(llvm::errs());
if (FD->getBodyIfAvailable()) {
- llvm::cerr << '\n';
+ llvm::errs() << '\n';
FD->getBodyIfAvailable()->viewAST();
- llvm::cerr << '\n';
+ llvm::errs() << '\n';
}
return;
}
@@ -128,9 +127,9 @@
MD->print(llvm::errs());
if (MD->getBody()) {
- llvm::cerr << '\n';
+ llvm::errs() << '\n';
MD->getBody()->viewAST();
- llvm::cerr << '\n';
+ llvm::errs() << '\n';
}
}
}
Modified: cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/AnalysisConsumer.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/AnalysisConsumer.cpp Sun Aug 23 07:08:50 2009
@@ -17,8 +17,6 @@
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/ADT/OwningPtr.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/PathDiagnostic.h"
@@ -32,10 +30,11 @@
#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
#include "llvm/System/Program.h"
+#include "llvm/ADT/OwningPtr.h"
using namespace clang;
@@ -476,7 +475,7 @@
if (!ErrMsg.empty())
return 0;
- llvm::cerr << "Writing '" << Filename << "'.\n";
+ llvm::errs() << "Writing '" << Filename << "'.\n";
llvm::OwningPtr<llvm::raw_fd_ostream> Stream;
std::string filename = Filename.toString();
@@ -534,7 +533,7 @@
UbigraphViz::~UbigraphViz() {
Out.reset(0);
- llvm::cerr << "Running 'ubiviz' program... ";
+ llvm::errs() << "Running 'ubiviz' program... ";
std::string ErrMsg;
llvm::sys::Path Ubiviz = llvm::sys::Program::FindProgramByName("ubiviz");
std::vector<const char*> args;
@@ -543,7 +542,7 @@
args.push_back(0);
if (llvm::sys::Program::ExecuteAndWait(Ubiviz, &args[0],0,0,0,0,&ErrMsg)) {
- llvm::cerr << "Error viewing graph: " << ErrMsg << "\n";
+ llvm::errs() << "Error viewing graph: " << ErrMsg << "\n";
}
// Delete the directory.
Modified: cfe/trunk/lib/Frontend/CacheTokens.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CacheTokens.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CacheTokens.cpp (original)
+++ cfe/trunk/lib/Frontend/CacheTokens.cpp Sun Aug 23 07:08:50 2009
@@ -20,12 +20,11 @@
#include "clang/Basic/OnDiskHashTable.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
-#include "llvm/ADT/StringMap.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/ADT/StringMap.h"
// FIXME: put this somewhere else?
#ifndef S_ISDIR
Modified: cfe/trunk/lib/Frontend/FixItRewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FixItRewriter.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FixItRewriter.cpp (original)
+++ cfe/trunk/lib/Frontend/FixItRewriter.cpp Sun Aug 23 07:08:50 2009
@@ -16,10 +16,9 @@
#include "clang/Frontend/FixItRewriter.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/FrontendDiagnostic.h"
-#include "llvm/ADT/OwningPtr.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
+#include "llvm/ADT/OwningPtr.h"
using namespace clang;
FixItRewriter::FixItRewriter(Diagnostic &Diags, SourceManager &SourceMgr,
Modified: cfe/trunk/lib/Frontend/GeneratePCH.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/GeneratePCH.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/GeneratePCH.cpp (original)
+++ cfe/trunk/lib/Frontend/GeneratePCH.cpp Sun Aug 23 07:08:50 2009
@@ -23,7 +23,6 @@
#include "llvm/System/Path.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/Streams.h"
#include <string>
using namespace clang;
Modified: cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp (original)
+++ cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp Sun Aug 23 07:08:50 2009
@@ -23,7 +23,6 @@
#include "clang/Lex/Preprocessor.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
#include <fstream>
@@ -151,9 +150,9 @@
Directory.createDirectoryOnDisk(true, &ErrorMsg);
if (!Directory.isDirectory()) {
- llvm::cerr << "warning: could not create directory '"
- << Directory.toString() << "'\n"
- << "reason: " << ErrorMsg << '\n';
+ llvm::errs() << "warning: could not create directory '"
+ << Directory.toString() << "'\n"
+ << "reason: " << ErrorMsg << '\n';
noDir = true;
@@ -313,7 +312,7 @@
const RewriteBuffer *Buf = R.getRewriteBufferFor(FID);
if (!Buf) {
- llvm::cerr << "warning: no diagnostics generated for main file.\n";
+ llvm::errs() << "warning: no diagnostics generated for main file.\n";
return;
}
@@ -333,7 +332,7 @@
os.open(H.toString().c_str());
if (!os) {
- llvm::cerr << "warning: could not create file '" << F.toString() << "'\n";
+ llvm::errs() << "warning: could not create file '" << F.toString() << "'\n";
return;
}
Modified: cfe/trunk/lib/Frontend/RewriteMacros.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteMacros.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/RewriteMacros.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteMacros.cpp Sun Aug 23 07:08:50 2009
@@ -16,7 +16,6 @@
#include "clang/Rewrite/Rewriter.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Basic/SourceManager.h"
-#include "llvm/Support/Streams.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
#include "llvm/ADT/OwningPtr.h"
Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Sun Aug 23 07:08:50 2009
@@ -20,12 +20,11 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Lex/Lexer.h"
+#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/OwningPtr.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/Streams.h"
-#include "llvm/Support/raw_ostream.h"
using namespace clang;
using llvm::utostr;
Modified: cfe/trunk/lib/Lex/PTHLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PTHLexer.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PTHLexer.cpp (original)
+++ cfe/trunk/lib/Lex/PTHLexer.cpp Sun Aug 23 07:08:50 2009
@@ -97,7 +97,7 @@
//===--------------------------------------==//
#if 0
SourceManager& SM = PP->getSourceManager();
- llvm::cerr << SM.getFileEntryForID(FileID)->getName()
+ llvm::errs() << SM.getFileEntryForID(FileID)->getName()
<< ':' << SM.getLogicalLineNumber(Tok.getLocation())
<< ':' << SM.getLogicalColumnNumber(Tok.getLocation())
<< '\n';
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=79854&r1=79853&r2=79854&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Sun Aug 23 07:08:50 2009
@@ -37,7 +37,7 @@
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/Support/raw_ostream.h"
#include <cstdio>
using namespace clang;
@@ -126,27 +126,27 @@
}
void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {
- llvm::cerr << tok::getTokenName(Tok.getKind()) << " '"
- << getSpelling(Tok) << "'";
+ llvm::errs() << tok::getTokenName(Tok.getKind()) << " '"
+ << getSpelling(Tok) << "'";
if (!DumpFlags) return;
- llvm::cerr << "\t";
+ llvm::errs() << "\t";
if (Tok.isAtStartOfLine())
- llvm::cerr << " [StartOfLine]";
+ llvm::errs() << " [StartOfLine]";
if (Tok.hasLeadingSpace())
- llvm::cerr << " [LeadingSpace]";
+ llvm::errs() << " [LeadingSpace]";
if (Tok.isExpandDisabled())
- llvm::cerr << " [ExpandDisabled]";
+ llvm::errs() << " [ExpandDisabled]";
if (Tok.needsCleaning()) {
const char *Start = SourceMgr.getCharacterData(Tok.getLocation());
- llvm::cerr << " [UnClean='" << std::string(Start, Start+Tok.getLength())
- << "']";
+ llvm::errs() << " [UnClean='" << std::string(Start, Start+Tok.getLength())
+ << "']";
}
- llvm::cerr << "\tLoc=<";
+ llvm::errs() << "\tLoc=<";
DumpLocation(Tok.getLocation());
- llvm::cerr << ">";
+ llvm::errs() << ">";
}
void Preprocessor::DumpLocation(SourceLocation Loc) const {
@@ -154,32 +154,32 @@
}
void Preprocessor::DumpMacro(const MacroInfo &MI) const {
- llvm::cerr << "MACRO: ";
+ llvm::errs() << "MACRO: ";
for (unsigned i = 0, e = MI.getNumTokens(); i != e; ++i) {
DumpToken(MI.getReplacementToken(i));
- llvm::cerr << " ";
+ llvm::errs() << " ";
}
- llvm::cerr << "\n";
+ llvm::errs() << "\n";
}
void Preprocessor::PrintStats() {
- llvm::cerr << "\n*** Preprocessor Stats:\n";
- llvm::cerr << NumDirectives << " directives found:\n";
- llvm::cerr << " " << NumDefined << " #define.\n";
- llvm::cerr << " " << NumUndefined << " #undef.\n";
- llvm::cerr << " #include/#include_next/#import:\n";
- llvm::cerr << " " << NumEnteredSourceFiles << " source files entered.\n";
- llvm::cerr << " " << MaxIncludeStackDepth << " max include stack depth\n";
- llvm::cerr << " " << NumIf << " #if/#ifndef/#ifdef.\n";
- llvm::cerr << " " << NumElse << " #else/#elif.\n";
- llvm::cerr << " " << NumEndif << " #endif.\n";
- llvm::cerr << " " << NumPragma << " #pragma.\n";
- llvm::cerr << NumSkipped << " #if/#ifndef#ifdef regions skipped\n";
+ llvm::errs() << "\n*** Preprocessor Stats:\n";
+ llvm::errs() << NumDirectives << " directives found:\n";
+ llvm::errs() << " " << NumDefined << " #define.\n";
+ llvm::errs() << " " << NumUndefined << " #undef.\n";
+ llvm::errs() << " #include/#include_next/#import:\n";
+ llvm::errs() << " " << NumEnteredSourceFiles << " source files entered.\n";
+ llvm::errs() << " " << MaxIncludeStackDepth << " max include stack depth\n";
+ llvm::errs() << " " << NumIf << " #if/#ifndef/#ifdef.\n";
+ llvm::errs() << " " << NumElse << " #else/#elif.\n";
+ llvm::errs() << " " << NumEndif << " #endif.\n";
+ llvm::errs() << " " << NumPragma << " #pragma.\n";
+ llvm::errs() << NumSkipped << " #if/#ifndef#ifdef regions skipped\n";
- llvm::cerr << NumMacroExpanded << "/" << NumFnMacroExpanded << "/"
+ llvm::errs() << NumMacroExpanded << "/" << NumFnMacroExpanded << "/"
<< NumBuiltinMacroExpanded << " obj/fn/builtin macros expanded, "
<< NumFastMacroExpanded << " on the fast path.\n";
- llvm::cerr << (NumFastTokenPaste+NumTokenPaste)
+ llvm::errs() << (NumFastTokenPaste+NumTokenPaste)
<< " token paste (##) operations performed, "
<< NumFastTokenPaste << " on the fast path.\n";
}
More information about the cfe-commits
mailing list