What is the LLVM version bundled with Xcode?

See https://gist.github.com/yamaya/2924292 in which an interesting comment says:

Looking at the sources (src/CMakeLists.txt), it appears AppleClang is based on (approximately) the following LLVM branches: clang-700.0.72 => LLVM 3.7.0 clang-700.1.76 => LLVM 3.7.0 clang-700.1.81 => LLVM 3.7.0 clang-703.0.29 => LLVM 3.8.0 clang-703.0.31 => LLVM 3.8.0


The LLVM version reported was always misleading. "3.6.0svn" means that code was branched some time after 3.5 and before 3.6. However, Apple also applies bunch of local changes and backports bug fixes, so there is no way in general to relate to a particular mainline revision. This is why they removed it. And really, one need to treat Apple-shipped clang as a separate compiler (compared to the mainline clang).


wiki of xcode should be helpful.

Xcode7.0 => LLVM3.7.0


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 :)