I’m wondering which LLVM upstream version is used in “Apple LLVM version 9.0.0 (clang-900.0.38)” included in the latest stable Xcode 9.1?
The last source code published by Apple was https://opensource.apple.com/source/clang/clang-800.0.42.1/src/ which used LLVM 3.9 version (according to CMakeLists.txt).
The version you mention indicates when the release version was branched from llvm.org, but then during stabilization many bugfixes are cherry-picked on top of that. I would recommend looking at the various Swift release branches of llvm and clang at https://github.com/apple/swift-llvm and https://github.com/apple/swift-clang to get a more complete picture.
Thank you guys! It seems the current Xcode 9.1 uses LLVM 4.0 and the upcoming release (the one which will include Swift 4.1) will use at least LLVM 5.0 (already merged).