[llvm-dev] raw_pwrite_stream on a non-fixed-size buffer?
Frank Winter via llvm-dev
llvm-dev at lists.llvm.org
Wed May 4 08:14:07 PDT 2016
Thanks! It works.
On 05/04/2016 10:58 AM, Yaron Keren wrote:
> SmallString template parameter is the initial buffer size, but it
> resizes automaticallyas needed.
> 2016-05-04 17:47 GMT+03:00 Frank Winter via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>:
> I wanted to bring this up again. I still try to get access to the
> assembler of a jit-compiled function/module using llvm 3.8 and
> later. In 3.8 the interface to addPassesToEmitFile has changed and
> my old method doesn't work any more.
> In principle one gets the asm with
> targetMachine->addPassesToEmitFile( PM , *OS ,
> llvm::TargetMachine::CGFT_AssemblyFile )
> where *OS is a raw_pwrite_stream.
> The problem is that I only find use cases of raw_pwrite_stream where
> the derived class raw_svector_ostream is initialized on a
> SmallString, like
> SmallString<128> Str;
> raw_svector_ostream OS(Str);
> However, the assembler of the modules could be arbitrary large (not
> fitting in any finite sized SmallString)
> What can I do?
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
More information about the llvm-dev