[llvm-dev] Conversion of const llvm::MCExpr * to string

Florian Hahn via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 5 04:34:43 PDT 2017


Hi,

On 05/10/2017 02:05, hameeza ahmed via llvm-dev wrote:
> I need the expression in string. How can i convert llvm::MCExpr * to string?
> 

Using MCExpr::print [1] with raw_string_ostream [2] should do what you 
want to do.

Cheers,
Florian



[1] 
http://llvm.org/doxygen/classllvm_1_1MCExpr.html#ae3067756d9df7843be2d25cedab37da4

[2] http://llvm.org/doxygen/classllvm_1_1raw__string__ostream.html


More information about the llvm-dev mailing list