This change is to fix build errors “Cannot open include file: 'sanitizer/asan_interface.h'” when building LLVM with MSVC and LLVM_USE_SANITIZER=Address.
I have used the VCToolsInstallDir environment variable to generate the path, let me know if there is a better alternative.
Tested with visual studio 2019 v16.9.6
I sent the previous comment too early, I see this now.
@cbezault , is there a reason MSVC doesn't ship asan_interface.h with the other includes? I imagine there could be some bad interaction if clang-cl finds the wrong asan_interface.h (MSVC's instead its own from compiler-rt), but clang puts its resource directory onto the search path first, so this should work.
If the usage if asan_interface.h is to call the LSan APIs, I think it would be reasonable to still use __has_include, since LSan support is new and somewhat optional. I would rather not add all internal crt sources to the header search paths used for all compiles in LLVM.