In Xcode 4
I could see the assembly file by clicking on Product\Generate Output\Assembly File
.
But in Xcode 6 and 7 I do not see that option for a Swift
file.
Is this feature removed or where do I find it?
This only works for pure Swift, but a nice swift assembler is online here: https://swift.godbolt.org. It even color-codes different sections so you can see which lines the assembly comes from.
Xcode 6 and Xcode 7 (up to the current Xcode 7.3) do not offer the option to view the generated assembly file for Swift input. (Perhaps that feature will be added in a later release.)
Currently the only way that I know of is to call the compiler on the command line with the "-emit-assembly" option, e.g.
xcrun -sdk macosx swiftc -emit-assembly main.swift
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With