<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Forgot cc'ing the list...<br>
<div class="moz-forward-container"><br>
-------- Original Message --------
<table class="moz-email-headers-table" cellpadding="0"
cellspacing="0" border="0">
<tbody>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:
</th>
<td>Re: [LLVMdev] Getting Static Array Content</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
<td>Fri, 28 Sep 2012 08:55:51 +0200</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
<td>Ivan Llopard <a class="moz-txt-link-rfc2396E" href="mailto:ivanllopard@gmail.com"><ivanllopard@gmail.com></a></td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
<td>Ryan Taylor <a class="moz-txt-link-rfc2396E" href="mailto:ryta1203@gmail.com"><ryta1203@gmail.com></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Ryan,<br>
<br>
On 28/09/2012 02:07, Ryan Taylor wrote:<br>
<blockquote
cite="mid:CABgVvXtX=bLhg7HCADOYBFv7KUFPYAxSN3rD8G2gSuAzu66YQA@mail.gmail.com"
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>
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
cite="mid:CABgVvXtX=bLhg7HCADOYBFv7KUFPYAxSN3rD8G2gSuAzu66YQA@mail.gmail.com"
type="cite"><br>
I basically just want to check for ConstantDataSequential and
print out the values.<br>
<br>
Thanks.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
<br>
<br>
</div>
<br>
</body>
</html>