[cfe-dev] Emit assembly to memory buffer with clang

Tatiana Dikopalova via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 21 11:14:49 PST 2017


Hello all,

I'm trying to use clang to emit assembly to a buffer.
I'm using EmitAssemblyAction and have troubles figuring out a way to 
provide custom output stream or memory buffer to emit the assembly into 
(seems like remapping files to memory buffers with addRemappedFile works 
only with input files).
Is there a way to set a custom output stream or remap output file while 
still using CompilerInstance/CodeGenAction? Or should I use something else?

-- 
Best Regards,
Tatiana




More information about the cfe-dev mailing list