diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-23 04:37:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 04:37:46 +0000 |
commit | bdff548e4dd577a72094d57b282de4e765643b96 (patch) | |
tree | 71c6617214b134968352b854c8f82ce8c89e1282 /lib/Transforms/Utils/CodeExtractor.cpp | |
parent | 405ce8db96f7a3a5a4c3da0f71d2ca54d30316f0 (diff) | |
download | llvm-bdff548e4dd577a72094d57b282de4e765643b96.tar.gz llvm-bdff548e4dd577a72094d57b282de4e765643b96.tar.bz2 llvm-bdff548e4dd577a72094d57b282de4e765643b96.tar.xz |
eliminate the "Value" printing methods that print to a std::ostream.
This required converting a bunch of stuff off DOUT and other cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CodeExtractor.cpp')
-rw-r--r-- | lib/Transforms/Utils/CodeExtractor.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index c98317bf80..0558bf09ca 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -29,6 +29,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/ADT/StringExtras.h" #include <algorithm> #include <set> @@ -236,8 +237,8 @@ Function *CodeExtractor::constructFunction(const Values &inputs, BasicBlock *newHeader, Function *oldFunction, Module *M) { - DOUT << "inputs: " << inputs.size() << "\n"; - DOUT << "outputs: " << outputs.size() << "\n"; + DEBUG(errs() << "inputs: " << inputs.size() << "\n"); + DEBUG(errs() << "outputs: " << outputs.size() << "\n"); // This function returns unsigned, outputs will go back by reference. switch (NumExitBlocks) { @@ -253,25 +254,25 @@ Function *CodeExtractor::constructFunction(const Values &inputs, for (Values::const_iterator i = inputs.begin(), e = inputs.end(); i != e; ++i) { const Value *value = *i; - DOUT << "value used in func: " << *value << "\n"; + DEBUG(errs() << "value used in func: " << *value << "\n"); paramTy.push_back(value->getType()); } // Add the types of the output values to the function's argument list. for (Values::const_iterator I = outputs.begin(), E = outputs.end(); I != E; ++I) { - DOUT << "instr used in func: " << **I << "\n"; + DEBUG(errs() << "instr used in func: " << **I << "\n"); if (AggregateArgs) paramTy.push_back((*I)->getType()); else paramTy.push_back(PointerType::getUnqual((*I)->getType())); } - DOUT << "Function type: " << *RetTy << " f("; + DEBUG(errs() << "Function type: " << *RetTy << " f("); for (std::vector<const Type*>::iterator i = paramTy.begin(), e = paramTy.end(); i != e; ++i) - DOUT << **i << ", "; - DOUT << ")\n"; + DEBUG(errs() << **i << ", "); + DEBUG(errs() << ")\n"); if (AggregateArgs && (inputs.size() + outputs.size() > 0)) { PointerType *StructPtr = |