As a comment just below says, the solution is quite simple:
> ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it
https://pastebin.com/8M9Dbrgj
This doesn't provide anything useful either.
> zsh: illegal hardware instruction LLVM_SYMBOLIZER_PATH=/usr/local/opt/llvm/bin/llvm-symbolizer swift main.swift
zsh: illegal hardware instruction swift main.swift