Frank Winter
2013-May-22 20:25 UTC
[LLVMdev] How to write output of a backend to a memory buffer instead of a into a file?
Right now, I am using TargetMachine::addPassesToEmitFile <http://llvm.org/docs/doxygen/html/classllvm_1_1LLVMTargetMachine.html#a356929c1f0d202e4a9d3202aff1dbb05> to write the output of a backend to a file. How can I tell LLVM to write into a memory buffer instead? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130522/4727bfb6/attachment.html>
Eli Bendersky
2013-May-22 20:35 UTC
[LLVMdev] How to write output of a backend to a memory buffer instead of a into a file?
On Wed, May 22, 2013 at 1:25 PM, Frank Winter <fwinter at jlab.org> wrote:> Right now, I am using > > TargetMachine::addPassesToEmitFile<http://llvm.org/docs/doxygen/html/classllvm_1_1LLVMTargetMachine.html#a356929c1f0d202e4a9d3202aff1dbb05> > > to write the output of a backend to a file. How can I tell LLVM to write > into a memory buffer instead >Look at addPassesToEmitMC. One example would be its usage in MCJIT (lib/ExecutionEngine/MCJIT/MCJIT.cpp), which indeed emits the binary into memory and loads it from there. Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130522/7e2e76af/attachment.html>