[swift-users] clang builtins from Swift?

Chris Lattner clattner at apple.com
Mon Oct 3 11:58:10 CDT 2016


> On Oct 2, 2016, at 6:24 PM, Jean-Denis Muys via swift-users <swift-users at swift.org> wrote:
> 
> Hi,
> 
> Xcode seems to think that [some] builtins can be used from Swift. It autocompletes popcount for example, and command-clicking the function opens a bona fide interface file, with the following declaration (among others):
> 
> public func __builtin_popcount(_: UInt32) -> Int32
> 
> However, when I try to compile code that uses that function, I get an unresolved identifier compiler error.
> 
> I guess I need to import some module, but which one?

Huh, that is odd.  It should not be made available to Swift code like that.  Please file a jira or radar ticket, thank you!

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161003/934738f5/attachment.html>


More information about the swift-users mailing list