mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 14:16:44 +00:00

In 664f345cd53d1f624d94f9889a1c9fff803e3391, a fix was introduced, attempting to restore LLVM_DIR and Clang_DIR after doing find_package(Clang). However, 6775285e7695f2d45cf455f5d31b2c9fa9362d3d added a return if the clangTidy target wasn't found. If this is hit, we don't restore LLVM_DIR and Clang_DIR, which causes strange effects if CMake is rerun a second time. Move the code for restoring LLVM_DIR and Clang_DIR to directly after the find_package calls, to make sure they are restored, regardless of the find_package outcome.