Author: revane Date: Wed Mar 13 08:36:56 2013 New Revision: 176944 URL: http://llvm.org/viewvc/llvm-project?rev=176944&view=rev Log: ClangTool output cleanup
Information messages sent to stdout by ClangTool now only happen when the -debug flag is set. Error messages that used to go to stdout now go to stderr. Author: Ariel J Bernal <[email protected]> Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=176944&r1=176943&r2=176944&view=diff ============================================================================== --- cfe/trunk/lib/Tooling/Tooling.cpp (original) +++ cfe/trunk/lib/Tooling/Tooling.cpp Wed Mar 13 08:36:56 2013 @@ -25,6 +25,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Host.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Debug.h" // For chdir, see the comment in ClangTool::run for more information. #ifdef _WIN32 @@ -295,14 +296,16 @@ int ClangTool::run(FrontendActionFactory ArgsAdjuster->Adjust(CompileCommands[I].second.CommandLine); assert(!CommandLine.empty()); CommandLine[0] = MainExecutable; - llvm::outs() << "Processing: " << File << ".\n"; + DEBUG({ + llvm::dbgs() << "Processing: " << File << ".\n"; + }); ToolInvocation Invocation(CommandLine, ActionFactory->create(), &Files); for (int I = 0, E = MappedFileContents.size(); I != E; ++I) { Invocation.mapVirtualFile(MappedFileContents[I].first, MappedFileContents[I].second); } if (!Invocation.run()) { - llvm::outs() << "Error while processing " << File << ".\n"; + llvm::errs() << "Error while processing " << File << ".\n"; ProcessingFailed = true; } } _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
