<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 30, 2016 at 8:33 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":sk" class="" style="overflow:hidden">> +  /// These methods set and retrieve indirect symbol.<br>
> +  void setIndirectSymbol(Constant *Symbol) {<br>
> +    setOperand(0, Symbol);<br>
> +  }<br>
<br>
Should setIndirectSymbol() be protected?  I feel like the IFunc<br>
version might want to add some extra checks about the type of<br>
symbol passed in, or constrain the type somehow.<br>
<br>
Although maybe those checks would fit better in the verifier?<br></div></blockquote></div><br>Both approaches have sense to me. Having setIndirectSymbol public gives an ability to use GlobalIndirectSymbol polymorphic (for example, it is used in BitcodeReader in ifunc patch). But GlobalAlias does have assert in setAliasee for types, everything else is checked in verifier. I would prefer to keep setIndirectSymbol public because setOperand is public so it is possible to skip setAliasee check anyway. But if you think that it should be private, I have no objections. please let me know what do you prefer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Duncan and Eric, thank you for review!</div></div>