A simple sed doing these substitutions:
- ${LLVM_BINARY_DIR}/\$\{CMAKE_CFG_INTDIR}/lib(${LLVM_LIBDIR_SUFFIX})?\> -> ${LLVM_LIBRARY_DIR}
- ${LLVM_BINARY_DIR}/\$\{CMAKE_CFG_INTDIR}/bin\> -> ${LLVM_TOOLS_BINARY_DIR}
where \> means "word boundary".
The only manual modifications were reverting changes in
- compiler-rt/cmake/Modules/CompilerRTUtils.cmake
because these were "entry points" where we wanted to tread carefully not not introduce a "loop" which would end with an undefined variable being expanded to nothing.
There are many more occurrences without CMAKE_CFG_INTDIR, but those are left for D132316 as they have proved somewhat tricky to fix.
This hopefully increases readability overall, and also decreases the usages of LLVM_LIBDIR_SUFFIX, preparing us for D130586.