diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-25 01:13:51 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-25 01:13:51 +0000 |
commit | 6c1980b3357207c4d756255bc5e32323eac278dc (patch) | |
tree | 972dbd8c9bdba9468af74a8a2e1c119c98f9fcff /lib/Transforms/Utils/LowerSwitch.cpp | |
parent | fef8bb24de86ff41d09a7787c6c52b058a853e39 (diff) | |
download | external_llvm-6c1980b3357207c4d756255bc5e32323eac278dc.zip external_llvm-6c1980b3357207c4d756255bc5e32323eac278dc.tar.gz external_llvm-6c1980b3357207c4d756255bc5e32323eac278dc.tar.bz2 |
Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 70db29e..89adb98 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -122,14 +122,6 @@ static raw_ostream& operator<<(raw_ostream &O, return O << "]"; } -static OStream& operator<<(OStream &O, const LowerSwitch::CaseVector &C) { - if (O.stream()) { - raw_os_ostream OS(*O.stream()); - OS << C; - } - return O; -} - // switchConvert - Convert the switch statement into a binary lookup of // the case values. The function recursively builds this tree. // @@ -144,9 +136,9 @@ BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End, unsigned Mid = Size / 2; std::vector<CaseRange> LHS(Begin, Begin + Mid); - DOUT << "LHS: " << LHS << "\n"; + DEBUG(errs() << "LHS: " << LHS << "\n"); std::vector<CaseRange> RHS(Begin + Mid, End); - DOUT << "RHS: " << RHS << "\n"; + DEBUG(errs() << "RHS: " << RHS << "\n"); CaseRange& Pivot = *(Begin + Mid); DEBUG(errs() << "Pivot ==> " @@ -314,9 +306,9 @@ void LowerSwitch::processSwitchInst(SwitchInst *SI) { CaseVector Cases; unsigned numCmps = Clusterify(Cases, SI); - DOUT << "Clusterify finished. Total clusters: " << Cases.size() - << ". Total compares: " << numCmps << "\n"; - DOUT << "Cases: " << Cases << "\n"; + DEBUG(errs() << "Clusterify finished. Total clusters: " << Cases.size() + << ". Total compares: " << numCmps << "\n"); + DEBUG(errs() << "Cases: " << Cases << "\n"); BasicBlock* SwitchBlock = switchConvert(Cases.begin(), Cases.end(), Val, OrigBlock, NewDefault); |