Ivan,<br><br> Yes, I had used these for some other values. Looks like this is a constant type that I wasn't accounting for.<br><br>Thanks.<br><br><div class="gmail_quote">On Thu, Sep 27, 2012 at 11:55 PM, Ivan Llopard <span dir="ltr"><<a href="mailto:ivanllopard@gmail.com" target="_blank">ivanllopard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi Ryan,<div class="im"><br>
<br>
On 28/09/2012 02:07, Ryan Taylor wrote:<br>
<blockquote type="cite">I'm trying to get the values in a static global array.
What is the best way to go about doing this?<br>
<br>
Once I have the pointer (Ie GlobalVariable *GV =
dyn_cast<GlobalVariable>(itr))?<br>
</blockquote>
<br></div>
Yes. Take a look at hasInitializer() and getInitializer() methods.
The latter should give you a ConstantDataArray for arrays of simple
types (dyn_cast here again to be sure).<br>
<br>
Ivan<br>
<br>
<blockquote type="cite"><div class="im"><br>
I basically just want to check for ConstantDataSequential and
print out the values.<br>
<br>
Thanks.<br>
<br>
<fieldset></fieldset>
<br>
</div><pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br>