LLVM version of latest swift version and keeping variable names for IR generation in swiftc


I am very new to llvm and compiler project in general.
I am working on a project for which I need to compile swift to llvm ir and then run an analysis pass on it. For this, it would be great if in the ir I could keep the actual names of the variables.

With clang I can use “-fno-discard-value-names”, is there something similar in swift?

My second question is, how can I find out the version of LLVM the latest version of swift(installed with homebrew version 5.5) is?

Swift development isn’t hosted at llvm.org; try Swift.org - Community Overview .