diff options
author | Edwin Vane <edwin.vane@intel.com> | 2013-03-13 13:36:56 +0000 |
---|---|---|
committer | Edwin Vane <edwin.vane@intel.com> | 2013-03-13 13:36:56 +0000 |
commit | 666f6b6de7c2df546e957aaa7e8bbe29664e0957 (patch) | |
tree | caab58a436be15c9c3ff577dae5f0a7bc40bd754 /clang/lib/Tooling/Tooling.cpp | |
parent | 96f82f8ac38a13d1de50e170e16860ded36f2fc3 (diff) | |
download | bcm5719-llvm-666f6b6de7c2df546e957aaa7e8bbe29664e0957.tar.gz bcm5719-llvm-666f6b6de7c2df546e957aaa7e8bbe29664e0957.zip |
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 <ariel.j.bernal@intel.com>
llvm-svn: 176944
Diffstat (limited to 'clang/lib/Tooling/Tooling.cpp')
-rw-r--r-- | clang/lib/Tooling/Tooling.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp index a9e7b84808c..58047b3aae9 100644 --- a/clang/lib/Tooling/Tooling.cpp +++ b/clang/lib/Tooling/Tooling.cpp @@ -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 *ActionFactory) { 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; } } |