[LLVMdev] how to stream output of addPassesToEmitMC

Fan Dawei fandawei.s at gmail.com
Fri Dec 30 00:51:43 PST 2011

Hi llvmdev,

I am still using llvm 2.9. The function addPassesToEmitMC in 3.0 takes a
extra parameter to specify the raw stream for the emitter to emit code.
However in 2.9, there is no such a parameter. How shall I do if want to
pass a raw_stream object?

llvm 2.9
// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
/// used to build custom MCStreamer.
bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
                                          MCContext *&Ctx,
                                          CodeGenOpt::Level OptLevel,
                                          bool DisableVerify)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111230/0baeb235/attachment.html>

More information about the llvm-dev mailing list