<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 5, 2013 at 5:29 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank" class="cremed">nicholas@mxc.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":6h4" style="overflow:hidden">+ bool onlyReadsMemory(unsigned n) const {<br>
+ return AttributeSets.hasAttribute(n, Attribute::ReadOnly) ||<br>
+ AttributeSets.hasAttribute(n, Attribute::ReadNone);<br>
+ }<br>
+ void setOnlyReadsMemory(unsigned n) {<br>
+ addAttribute(n, Attribute::ReadOnly);<br>
+ }<br>
+</div></blockquote></div><br>It seems weird interface wise to only expose this in the 'or' form. I know the only user you have today expects that form, but interface wise it would seem cleaner to either expose the attribute semantics directly, or to expose an OR of the attributes and the readnone separately (as readnone is essentially a strict subset of readonly).</div>
</div>