[llvm-dev] How to get the textual representation of an IR instruction?

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Fri May 12 08:39:06 PDT 2017


There is raw_string_ostream which prints to a std::string.

-Krzysztof

On 5/12/2017 10:34 AM, Dipanjan Das via llvm-dev wrote:
> 
> If 'I' is of type llvm::Instruction, we can print out the human-readable 
> form (textual representation) of it by by, errs() << I;
> 
> I want the assign the exact same representation to a std::string to C 
> type string. How can I do that?
> 
> -- 
> 
> Thanks & Regards,
> 
> Dipanjan
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-dev mailing list