diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-24 10:36:58 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-24 10:36:58 +0000 |
commit | 1cd1d98232c3c3a0bd3810c3bf6c2572ea02f208 (patch) | |
tree | 233ac1c2bca5a7f2a8eb43b1a2815d807d9e4f9f /lib/Transforms/Utils/LowerSwitch.cpp | |
parent | b95c2fd2700a92a7b857ebd1ecf6c7d561d676d2 (diff) |
Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index b4121479db..70db29e1c0 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -109,8 +109,8 @@ bool LowerSwitch::runOnFunction(Function &F) { // operator<< - Used for debugging purposes. // -static std::ostream& operator<<(std::ostream &O, - const LowerSwitch::CaseVector &C) { +static raw_ostream& operator<<(raw_ostream &O, + const LowerSwitch::CaseVector &C) { O << "["; for (LowerSwitch::CaseVector::const_iterator B = C.begin(), @@ -123,7 +123,10 @@ static std::ostream& operator<<(std::ostream &O, } static OStream& operator<<(OStream &O, const LowerSwitch::CaseVector &C) { - if (O.stream()) *O.stream() << C; + if (O.stream()) { + raw_os_ostream OS(*O.stream()); + OS << C; + } return O; } |