<div dir="ltr">Hi Alexandru,<div><br></div><div style>if you have a Value pointer named v, you could use the method v->getValue<span class="">().</span>getLimitedValue<span class="">(), which returns </span><span class="">uint64_t, that can be casted as int.</span></div>

<div style><span class=""><br></span></div><div style><span class="">Hope I could help,</span></div>















</div><div class="gmail_extra"><br clear="all"><div><br>--<br>Cristianno Martins<br>PhD Student of Computer Science<br>University of Campinas<br><a href="mailto:cmartins@ic.unicamp.br" target="_blank">cmartins@ic.unicamp.br</a><br>

<a href="mailto:cristiannomartins@hotmail.com" target="_blank"></a></div>
<br><br><div class="gmail_quote">On Tue, Jun 25, 2013 at 4:05 AM, Alexandru Ionut Diaconescu <span dir="ltr"><<a href="mailto:cyrusthevirus001x@yahoo.com" target="_blank">cyrusthevirus001x@yahoo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:times new roman,new york,times,serif"><div>Hello !</div><div><br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif">

This may be a trivial question, but I cannot get fields from a Value type.</div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif">

If my Value is <span style="font-style:italic"><span style="font-weight:bold">i32 1</span></span>, how can I store <span style="font-style:italic"><span style="font-weight:bold">1</span></span> in a different structure (an integer) ?
 For the type, I have getType(). For the value, I see no method in Value.h. <span><br></span></div><div style="font-style:italic;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif">

<span><br></span></div><div style="font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif"><span>I tried to cast to <span style="font-style:italic">ConstantExpr</span> and then to get operands, or cast to <span style="font-style:italic">ConstantDataArray</span> and then use <span style="font-style:italic">getAsString</span>(), but is not working. How should I get the value?</span></div>

<div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif"><span><br></span></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif">

<span>Thank you !<br></span></div><div style="font-style:italic;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:italic;font-size:13.3333px;background-color:transparent;font-family:times new roman,new york,times,serif">

</div></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>