Converting raw_ostream to std::ostream

Dear All,

I am currently writing an analysis pass that uses a third-party library. I want to write a print() method for my pass (which takes one of the LLVM raw_ostream objects) and have it use a method from this third-party library to print out data. However, the third-party library uses std::ostream.

Is there a way to create a std::ostream from a raw_ostream?

-- John T.

Hi John T.,

You can't make a std::ostream from a raw_ostream but you can go the other
direction with it.
See for details
about raw_os_ostream.

Hope this helps you,

--Sam Crow