[LLVMdev] Create the Value object for StoreInst
θΏͺ
yidi95 at gmail.com
Sun Aug 15 18:30:53 PDT 2010
Hello all,
I would like to create a new StoreInst into a basic block. I found that I
could use methods like ConstantInt::get() to provide the Value* for the
first argument of the constructor of the StoreInst, but I don't know how to
provide the second one. For example, if I would to do x = 1, I would like
to create the "Value" object of "x" for the second argument. I tried to
create the Value object directly to the StoreInst and it compiled, but it
segfaulted when executing. Also for this approach, I couldn't provide the
variable name (i.e. the "x") I want. I've been searching for the solution
for a long time but haven't found anything to it. Is there any way to
achieve this? Thank you very much!
Sincerely,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100815/a70b951b/attachment.html>
More information about the llvm-dev
mailing list