LLVM ERROR: Broken function found, compilation aborted

cra*_*man 5 abaddressbook ios swift xcode6

Here are couple of simple lines in swift:

let umAB: Unmanaged<ABAddressBookRef> = ABAddressBookCreate()
let ab: ABAddressBookRef = umAB.takeRetainedValue()
Run Code Online (Sandbox Code Playgroud)

The second line breaks code compilation, here's the error that I get:

Bitcast requires both operands to be pointer or neither
%27 = bitcast %objc_object* %26 to %PSs9AnyObject_, !dbg !170
LLVM ERROR: Broken function found, compilation aborted!
Command /Applications/Xcode6-Beta2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 1
Run Code Online (Sandbox Code Playgroud)

Any ideas what's wrong with the second line?

Dem*_*emi 1

虽然已经晚了,但答案很简单:这是编译器中的一个错误。 LLVM ERROR意味着已生成错误的 LLVM IR,这是调用程序中的错误。