diff options
author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-14 12:53:11 +0000 |
---|---|---|
committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-14 12:53:11 +0000 |
commit | d34e60ca8532511acb8c93ef26297e349fbec86a (patch) | |
tree | 1a095bc8694498d94232e81b95c1da05d462d3ec /llvm/tools/bugpoint/ToolRunner.cpp | |
parent | affbc99bea94e77f7ebccd8ba887e33051bd04ee (diff) | |
download | bcm5719-llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.tar.gz bcm5719-llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.zip |
Rename DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.
In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.
Differential Revision: https://reviews.llvm.org/D43624
llvm-svn: 332240
Diffstat (limited to 'llvm/tools/bugpoint/ToolRunner.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ToolRunner.cpp | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp index ea0128d0e82..2fb9f93ad7d 100644 --- a/llvm/tools/bugpoint/ToolRunner.cpp +++ b/llvm/tools/bugpoint/ToolRunner.cpp @@ -194,10 +194,10 @@ Expected<int> LLI::ExecuteProgram(const std::string &Bitcode, outs() << "<lli>"; outs().flush(); - DEBUG(errs() << "\nAbout to run:\t"; - for (unsigned i = 0, e = LLIArgs.size() - 1; i != e; ++i) errs() - << " " << LLIArgs[i]; - errs() << "\n";); + LLVM_DEBUG(errs() << "\nAbout to run:\t"; + for (unsigned i = 0, e = LLIArgs.size() - 1; i != e; ++i) errs() + << " " << LLIArgs[i]; + errs() << "\n";); return RunProgramWithTimeout(LLIPath, &LLIArgs[0], InputFile, OutputFile, OutputFile, Timeout, MemoryLimit); } @@ -481,10 +481,10 @@ Expected<CC::FileType> LLC::OutputCode(const std::string &Bitcode, outs() << (UseIntegratedAssembler ? "<llc-ia>" : "<llc>"); outs().flush(); - DEBUG(errs() << "\nAbout to run:\t"; - for (unsigned i = 0, e = LLCArgs.size() - 1; i != e; ++i) errs() - << " " << LLCArgs[i]; - errs() << "\n";); + LLVM_DEBUG(errs() << "\nAbout to run:\t"; + for (unsigned i = 0, e = LLCArgs.size() - 1; i != e; ++i) errs() + << " " << LLCArgs[i]; + errs() << "\n";); if (RunProgramWithTimeout(LLCPath, &LLCArgs[0], "", "", "", Timeout, MemoryLimit)) return ProcessFailure(LLCPath, &LLCArgs[0], Timeout, MemoryLimit); @@ -601,11 +601,11 @@ Expected<int> JIT::ExecuteProgram(const std::string &Bitcode, outs() << "<jit>"; outs().flush(); - DEBUG(errs() << "\nAbout to run:\t"; - for (unsigned i = 0, e = JITArgs.size() - 1; i != e; ++i) errs() - << " " << JITArgs[i]; - errs() << "\n";); - DEBUG(errs() << "\nSending output to " << OutputFile << "\n"); + LLVM_DEBUG(errs() << "\nAbout to run:\t"; + for (unsigned i = 0, e = JITArgs.size() - 1; i != e; ++i) errs() + << " " << JITArgs[i]; + errs() << "\n";); + LLVM_DEBUG(errs() << "\nSending output to " << OutputFile << "\n"); return RunProgramWithTimeout(LLIPath, &JITArgs[0], InputFile, OutputFile, OutputFile, Timeout, MemoryLimit); } @@ -710,10 +710,10 @@ Expected<int> CC::ExecuteProgram(const std::string &ProgramFile, outs() << "<CC>"; outs().flush(); - DEBUG(errs() << "\nAbout to run:\t"; - for (unsigned i = 0, e = CCArgs.size() - 1; i != e; ++i) errs() - << " " << CCArgs[i]; - errs() << "\n";); + LLVM_DEBUG(errs() << "\nAbout to run:\t"; + for (unsigned i = 0, e = CCArgs.size() - 1; i != e; ++i) errs() + << " " << CCArgs[i]; + errs() << "\n";); if (RunProgramWithTimeout(CCPath, &CCArgs[0], "", "", "")) return ProcessFailure(CCPath, &CCArgs[0]); @@ -758,15 +758,16 @@ Expected<int> CC::ExecuteProgram(const std::string &ProgramFile, // Now that we have a binary, run it! outs() << "<program>"; outs().flush(); - DEBUG(errs() << "\nAbout to run:\t"; - for (unsigned i = 0, e = ProgramArgs.size() - 1; i != e; ++i) errs() - << " " << ProgramArgs[i]; - errs() << "\n";); + LLVM_DEBUG( + errs() << "\nAbout to run:\t"; + for (unsigned i = 0, e = ProgramArgs.size() - 1; i != e; ++i) errs() + << " " << ProgramArgs[i]; + errs() << "\n";); FileRemover OutputBinaryRemover(OutputBinary.str(), !SaveTemps); if (RemoteClientPath.empty()) { - DEBUG(errs() << "<run locally>"); + LLVM_DEBUG(errs() << "<run locally>"); std::string Error; int ExitCode = RunProgramWithTimeout(OutputBinary.str(), &ProgramArgs[0], InputFile, OutputFile, OutputFile, @@ -855,10 +856,10 @@ Error CC::MakeSharedObject(const std::string &InputFile, FileType fileType, outs() << "<CC>"; outs().flush(); - DEBUG(errs() << "\nAbout to run:\t"; - for (unsigned i = 0, e = CCArgs.size() - 1; i != e; ++i) errs() - << " " << CCArgs[i]; - errs() << "\n";); + LLVM_DEBUG(errs() << "\nAbout to run:\t"; + for (unsigned i = 0, e = CCArgs.size() - 1; i != e; ++i) errs() + << " " << CCArgs[i]; + errs() << "\n";); if (RunProgramWithTimeout(CCPath, &CCArgs[0], "", "", "")) return ProcessFailure(CCPath, &CCArgs[0]); return Error::success(); |