Swift DocC offers syntax for this in the form of “``”, e.g.:

/// Some documentation that talks about ``foo``.
func foo() {}

This allows such references to be clicked with go to definition as well.

Swift does not offer syntax for get runtime string of compile-time identifier.