[llvm-rc] Look for "clang-<major>" when locating a suitable preprocessor
authorMartin Storsjö <martin@martin.st>
Thu, 23 Mar 2023 22:37:29 +0000 (00:37 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 28 Mar 2023 08:02:42 +0000 (11:02 +0300)
commit282744a9ce18120dc0a6eceb02693b36980d9498
tree907074ac8ea8a58505e8a75d798389f543a79e46
parentd2fa6b694c2052cef1ddd507f6569bc84e3bbe35
[llvm-rc] Look for "clang-<major>" when locating a suitable preprocessor

In some cases, there's no adjacent executable named "clang" or
"clang-cl", but one name "clang-<major>". This logic doesn't
cover every possible deployment setup of course, but should
cover more fairly common/reasonable cases.

See
https://github.com/curl/curl-for-win/commit/caaae171ac43af5b883403714dafd42030d8de61#commitcomment-105808524
for discussion about a case where this would have been helpful.

Differential Revision: https://reviews.llvm.org/D146794
llvm/tools/llvm-rc/llvm-rc.cpp