<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 10:33 PM, Kevin Ballard &lt;<a href="mailto:kevin@sb.org" class="">kevin@sb.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">


<title class=""></title>

<div class=""><div class="">On Fri, Dec 11, 2015, at 10:05 PM, Douglas Gregor wrote:<br class=""></div>
<blockquote type="cite" class=""><div class="">&nbsp;</div>
<div class=""><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 9:40 PM, Kevin Ballard &lt;<a href="mailto:kevin@sb.org" class="">kevin@sb.org</a>&gt; wrote:<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div class=""><div class="">Will do. My worry with using swift_name is that, at least in the clang that ships with Xcode 7.2, you can't actually put the swift_name attribute on an enum. I assume that will change with SE-0005, but I also assume this hasn't been implemented yet. And even when it is implemented, emitting it will be a backwards-compatibility hazard if the generated header needs to work with older clangs. Is there any way to suppress the error?<br class=""></div>
</div>
</div>
</blockquote><div class="">&nbsp;</div>
<div class="">Hrm, that’s a good point. The generalized swift_name support is implemented in upstream Clang, but you’re right that Xcode 7.2 won’t be able to parse it. We can add a “__has_feature” entry for generalized swift_name in Clang and wrap this particular use of swift_name in<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><span style="white-space:pre;" class=""></span>#if __has_feature(generalized_swift_name)<br class=""></div>
<div class=""><span style="white-space:pre;" class=""></span>// ...<br class=""></div>
<div class="">#endif<br class=""></div>
</div>
</blockquote><div class="">&nbsp;</div>
<div class="">That works for me. Can I assume this will get added by someone who's familiar with clang, or should I try and figure out how to do this myself and submit a patch?<br class=""></div>
</div></div></blockquote><br class=""></div><div>I went ahead and did this in</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-clang/commit/f66c5bb67b9a1016b51d2eff0f497d4528dacc0a" class="">https://github.com/apple/swift-clang/commit/f66c5bb67b9a1016b51d2eff0f497d4528dacc0a</a></div><div><br class=""></div><div>and it’s cherry-picks.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""></div><br class=""></body></html>