[LLVMdev] porting to 3.1: ConstantDataArray

Jay Foad jay.foad at gmail.com
Fri Nov 16 06:21:44 PST 2012


On 16 November 2012 13:55, charles quarra
<charllsnotieneningunputocorreo at gmail.com> wrote:
> In llvm 3.0 llvm::ConstantArray had a ::getAsCString() method that
> returned the buffer as a std::string. Now it seems that 3.1 this
> method dissapeared.
>
> I found that llvm::ConstantDataArray has a method called
> getAsString(), but it returns a Constant*.

In 3.1 ConstantDataArray has a getAsCString() which is exactly what
you want. See here line 623:

http://llvm.org/viewvc/llvm-project/llvm/tags/RELEASE_31/final/include/llvm/Constants.h?view=annotate

Jay.



More information about the llvm-dev mailing list