[LLVMdev] Converting raw_ostream to std::ostream

Samuel Crow samuraileumas at yahoo.com
Sat Nov 6 15:30:16 PDT 2010


Hi John T.,

You can't make a std::ostream from a raw_ostream but you can go the other 
direction with it. 
 See http://llvm.org/doxygen/classllvm_1_1raw__os__ostream.html for details 
about raw_os_ostream.

Hope this helps you,

--Sam Crow


----- Original Message ----
> From: "Criswell, John T" <criswell at ad.uiuc.edu>
> To: "llvmdev at cs.illinois.edu" <llvmdev at cs.illinois.edu>
> Sent: Sat, November 6, 2010 3:16:03 PM
> Subject: [LLVMdev] 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.
> 


      



More information about the llvm-dev mailing list