Up to Xcode 6 when typing clang --version
we got the information on what LLVM version it was built:
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
But now with Xcode 7 we only get the following:
Apple LLVM version 7.0.0 (clang-700.0.72)
Xcode also includes the LLVM GCC compiler, which uses the GCC compiler front end for maximum compatibility, and the LLVM back end, which takes advantage of LLVM's advanced code generator. This shows the flexibility of a library-based approach to compiler development.
Xcode's default toolchain bundled with clang 13. But clang bundled with Swift Open Source toolchain is 10 which behaves different to the default toolchain of current version of Xcode (Xcode 13.1) when compiling Swift project with C++ sources.
Wikipedia's Xcode page has a map of Apple to LLVM versions. The LLVM column has the open-source LLVM/Clang version. From this you can look up a language feature in cppreference's chart of compiler support for language features.
The wiki had show us already. https://en.wikipedia.org/wiki/Xcode#Latest_versions
Actually we can check swift version the Xcode used, and see the llvm version in swift-llvm
For Xcode 10, the swift version is 4.2, from CMakeLists.txt we can get the llvm version is 6.0.1
if(NOT DEFINED LLVM_VERSION_MAJOR)
set(LLVM_VERSION_MAJOR 6)
endif()
if(NOT DEFINED LLVM_VERSION_MINOR)
set(LLVM_VERSION_MINOR 0)
endif()
if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 1)
endif()
And Apple should not use two versions of llvm in clang and 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