<br><br><div class="gmail_quote">On Tue, Jan 25, 2011 at 9:14 AM, Devang Patel <span dir="ltr"><<a href="mailto:dpatel@apple.com">dpatel@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
On Jan 24, 2011, at 11:57 PM, Duncan Sands wrote:<br>
<br>
> Hi Talin,<br>
><br>
>> Really, all I need to make this work is some way to 'mark' a global so that my<br>
>> custom pass can query for all marked globals. Any ideas on this?<br>
><br>
> metadata maybe?<br>
<br>
</div>A better approach would be to create an global array of strings to hold names of marked globals. You know the name of this special array and use it to query all marked globals. This is the trick llvm-gcc uses to support PCH.<br>


<br></blockquote><div>Actually, the ability to attach metadata nodes to globals would be a cleaner way to do this - and it sounds like it would fit your use case as well, plus others that I can think of, such as annotation processing.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
-<br>
<font color="#888888">Devang<br>
</font><div><div></div><div class="h5"><br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>