The llvm-rc tool tries to locate a suitable Clang executable to
use for preprocessing. For this purpose, it first checks within
the same directory as the llvm-rc tool, checking with a couple
different names, followed by checking all of $PATH for another
couple names.
On Windows, the InitLLVM() function always sets up Argv[0] with the
full path to the executable, while on Unix, Argv[0] is kept as is.
Therefore, call getMainExecutable to try to resolve the directory of
the executable before looking for colocated Clang executables.
This makes 282744a9ce18120dc0a6eceb02693b36980d9498 actually have
the desired effect.
You can just pass nullptr to getMainExecutable instead of a symbol, unless there is a good reason here (I don't think so?).